Skip to content

ui/consts tests: failure on big endian hosts #98249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
awilfox opened this issue Jun 19, 2022 · 1 comment
Closed

ui/consts tests: failure on big endian hosts #98249

awilfox opened this issue Jun 19, 2022 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@awilfox
Copy link
Contributor

awilfox commented Jun 19, 2022

I ran the Rust test suite on a 64-bit Power9 system (big-endian). The following failures were noted, all of which appear to be due to endianness:

ui/consts/issue-83182

diff of 64bit.stderr:
6	   |
7	   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
8	   = note: the raw bytes of the constant (size: 16, align: 8) {
-	               ╾───────alloc4────────╼ 01 00 00 00 00 00 00 00 │ ╾──────╼........
+	               ╾───────alloc4────────╼ 00 00 00 00 00 00 00 01 │ ╾──────╼........
10	           }
11	
12	error: aborting due to previous error

The actual 64bit.stderr differed from the expected 64bit.stderr.

ui/consts/std/alloc

diff of 64bit.stderr:
6	   |
7	   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
8	   = note: the raw bytes of the constant (size: 16, align: 8) {
-	               00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+	               00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 │ ................
10	           }
11	
12	error: aborting due to previous error

The actual 64bit.stderr differed from the expected 64bit.stderr.

ui/constants/validate_never_arrays

diff of 64bit.stderr:
6	   |
7	   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
8	   = note: the raw bytes of the constant (size: 8, align: 8) {
-	               01 00 00 00 00 00 00 00                         │ ........
+	               00 00 00 00 00 00 00 01                         │ ........
10	           }
11	
12	error[E0080]: it is undefined behavior to use this value

17	   |
18	   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
19	   = note: the raw bytes of the constant (size: 16, align: 8) {
-	               01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 │ ................
+	               00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 │ ................
21	           }
22	
23	error[E0080]: it is undefined behavior to use this value

28	   |
29	   = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
30	   = note: the raw bytes of the constant (size: 16, align: 8) {
-	               01 00 00 00 00 00 00 00 2a 00 00 00 00 00 00 00 │ ........*.......
+	               00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 2a │ ...............*
32	           }
33	
34	error: aborting due to 3 previous errors

The actual 64bit.stderr differed from the expected 64bit.stderr.

The fix would likely be the same as a theoretical fix to #89577. I would like to note the ub-* tests that failed in #89577 do fail here as well.

@awilfox awilfox added the C-bug Category: This is a bug. label Jun 19, 2022
@Enselic
Copy link
Member

Enselic commented Jul 13, 2024

Triage: If the failures are the same as in #89577 and the failures are for the same reason, we can probably close as duplicate? Closing, but feel free to re-open if you disagree.

@Enselic Enselic closed this as not planned Won't fix, can't repro, duplicate, stale Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants