Skip to content

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

Open

Description

@infinity0

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.

Activity

  1. hameerabbasi commented on Oct 5, 2021

    @hameerabbasi
    Contributor

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

  2. infinity0 commented on Oct 5, 2021

    @infinity0
    ContributorAuthor

    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.

  3. infinity0 commented on Oct 5, 2021

    @infinity0
    ContributorAuthor

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

  4. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Oct 6, 2021
  5. hameerabbasi commented on Oct 6, 2021

    @hameerabbasi
    Contributor

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

  6. apiraino commented on Oct 6, 2021

    @apiraino
    Contributor

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

    @rustbot label -I-prioritize +P-medium

  7. added and removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Oct 6, 2021
  8. hameerabbasi commented on Oct 11, 2021

    @hameerabbasi
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-SystemZTarget: SystemZ processors (s390x)P-mediumMedium priorityregression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions