Skip to content
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

1.53.0 broke ui/consts/const-eval/ub-*.rs tests on s390x (big-endian, 64-bit) (regression) #89577

Open
infinity0 opened this issue Oct 5, 2021 · 6 comments
Labels
C-bug Category: This is a bug. O-SystemZ Target: SystemZ processors (s390x) P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another.

Comments

@infinity0
Copy link
Contributor

Probably because s390x is 64-bit big-endian not little-endian, e.g.:

Debian build log, warning several MB

sample
------------------------------------------
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

116        |
117        = 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.
118        = note: the raw bytes of the constant (size: 8, align: 4) {
-                      78 00 00 00 ff ff ff ff                         │ x.......
+                      00 00 00 78 ff ff ff ff                         │ ...x....
120                }
121     
122     error[E0080]: it is undefined behavior to use this value
test [ui] ui/consts/const-eval/ub-enum.rs ... FAILED
test [ui] ui/consts/const-eval/ub-int-array.rs ... FAILED
test [ui] ui/consts/const-eval/ub-nonnull.rs ... FAILED
test [ui] ui/consts/const-eval/ub-ref-ptr.rs ... FAILED
test [ui] ui/consts/const-eval/ub-uninhabit.rs ... FAILED
test [ui] ui/consts/const-eval/ub-wide-ptr.rs ... FAILED

These tests were fine in 1.52 so the culprit is probably #76881 @hameerabbasi . I will revert it in Debian for now.

@infinity0 infinity0 added the C-bug Category: This is a bug. label Oct 5, 2021
@hameerabbasi
Copy link
Contributor

Thanks for bringing this to my attention! I will attempt to work to fix it on the weekend.

@infinity0
Copy link
Contributor Author

Great, thanks! We've had similar endianness issues with these tests before; looking through the git history of those test files might give you some more ideas for solutions.

@infinity0
Copy link
Contributor Author

It looks like #73989 fixed it by replacing an endianness-dependent value 1 with an endianness-independent value 0, not sure if that's suitable for your case...

@workingjubilee workingjubilee added O-SystemZ Target: SystemZ processors (s390x) regression-from-stable-to-stable Performance or correctness regression from one stable version to another. labels Oct 6, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 6, 2021
@hameerabbasi
Copy link
Contributor

I had a few similar failures in the PR with different ABIs, I fixed them by limiting the tests to x86-64.

@apiraino
Copy link
Contributor

apiraino commented Oct 6, 2021

Assigning priority as discussed in the Zulip thread of the Prioritization Working Group.

@rustbot label -I-prioritize +P-medium

@rustbot rustbot added P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Oct 6, 2021
@hameerabbasi
Copy link
Contributor

hameerabbasi commented Oct 11, 2021

I've started a discussion about this on Zulip. Feel free to contribute with ideas?

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. O-SystemZ Target: SystemZ processors (s390x) P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another.
Projects
None yet
Development

No branches or pull requests

5 participants