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

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

Closed
saethlin opened this issue Aug 3, 2023 · 3 comments
Closed

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

saethlin opened this issue Aug 3, 2023 · 3 comments
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@saethlin
Copy link
Member

saethlin commented Aug 3, 2023

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
@saethlin saethlin added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Aug 3, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 3, 2023
@matthiaskrgr
Copy link
Member

duplicate of #114375 ?

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 3, 2023
@lukas-code
Copy link
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.

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 

@saethlin
Copy link
Member Author

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
Labels
C-bug Category: This is a bug. E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants