Skip to content

Broken MIR in DropGlue when compiling anyhow with -Zvalidate-mir #114437

Closed

Description

@saethlin

cargo bisect-rustc says this but I'm not sure I believe it:

Regression in rust-lang-ci@cda7b6d

searched nightlies: from nightly-2023-07-01 to nightly-2023-08-02
regressed nightly: nightly-2023-08-01
searched commit range: a17c796...db7ff98
regressed commit: dfc9d3f

bisected with cargo-bisect-rustc v0.6.6

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --start 2023-07-01 --end 2023-08-02 --script script --regress ice 

The script is just

RUSTFLAGS=-Zvalidate-mir cargo install cargo-deny --force

rustc-ice-2023-08-03T21:06:49.028857617Z-2267460.txt

error: internal compiler error: broken MIR in DropGlue(DefId(2:2152 ~ core[d518]::ptr::drop_in_place), Some(std::backtrace::Inner)) (after pass AbortUnwindingCalls) at bb2[0]:
                                Field projection `PlaceRef { local: _1, projection: [Deref, Downcast(Some("Captured"), 2)] }.0` specified type `std::sync::LazyLock<std::backtrace::Capture, [closure@std::backtrace::lazy_resolve::{closure#0}]>`, but actual type is `std::sync::LazyLock<std::backtrace::Capture, std::backtrace::LazyResolve>`
   --> /home/ben/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:497:1
    |
497 | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: delayed at compiler/rustc_const_eval/src/transform/validate.rs:76:25

Activity

  1. added
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    C-bugCategory: This is a bug.
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    on Aug 3, 2023
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Aug 3, 2023
  3. matthiaskrgr commented on Aug 3, 2023

    @matthiaskrgr
    Member

    duplicate of #114375 ?

  4. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Aug 3, 2023
  5. lukas-code commented on Aug 3, 2023

    @lukas-code
    Contributor

    cargo bisect-rustc says this but I'm not sure I believe it:

    Bisect points to #109075, because that's where this TAIT pattern got added to std.

    Bisecting the reduced example points me to #112777.

    Details

    Regression in rust-lang-ci@9cf74a0

    searched nightlies: from nightly-2023-06-13 to nightly-2023-08-02
    regressed nightly: nightly-2023-06-20
    searched commit range: 2d0aa57...fe7454b
    regressed commit: fe7454b

    bisected with cargo-bisect-rustc v0.6.6

    Host triple: x86_64-unknown-linux-gnu
    Reproduce with:

    cargo bisect-rustc -- rustc -- -Z validate-mir 
  6. saethlin commented on Oct 20, 2023

    @saethlin
    MemberAuthor

    This was a duplicate, and it's fixed.

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.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable ExampleI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-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