Skip to content

Spurious test failure codegen-llvm/issue-107681-unwrap_unchecked.rs #158500

Closed

Activity

  1. added
    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
    C-bugCategory: This is a bug.
    I-flaky-testIssue: A test is flaky/unreliable/spuriously fails
    on Jun 27, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jun 27, 2026
  3. workingjubilee commented on Jun 27, 2026

    @workingjubilee
    Member

    To summarize our current findings from that discussion thread:

    #158067 was the PR that introduced the sporadic failures

    cc @TimNN @dianqk

    The issue is probably due to randomize-layout in the codegen-llvm suite.

    The test was made more imprecise in a way that is probably unnecessary, while being made more precise in ways that are brittle in the face of randomize-layout.

    The line

        // CHECK: [[INNER:%.*]] = load ptr, ptr %x
    

    is not resilient to the load sometimes being from %x and sometimes being from a pointer assigned to %0 that is itself GEP'd from %x

    Revert posted at #158502

  4. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jun 27, 2026
  5. added a commit that references this issue on Jun 27, 2026
  6. added a commit that references this issue on Jun 27, 2026
  7. added a commit that references this issue on Jun 27, 2026
  8. TimNN commented on Jun 28, 2026

    @TimNN
    Contributor

    Thank you for the revert and sorry for the trouble, I wasn't aware of the Layout randomization part.

  9. workingjubilee commented on Jun 28, 2026

    @workingjubilee
    Member

    Honestly, it should not have been trouble, so it's quite fine. We probably need to try to figure out how to make the layout randomization not engage for codegen-llvm tests, but the Zulip thread also describes why that is not a quick 1-minute fix.

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

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-flaky-testIssue: A test is flaky/unreliable/spuriously failsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions