Skip to content

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

Closed

Description

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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