Skip to content

StorageLive of live local when building tokio with -Zcross-crate-inline-threshold=always + high MIR inlining threshold #117733

Closed
@saethlin

Description

@saethlin

Reproduces with https://github.com/tokio-rs/tokio on commit 19d96c067410e30da29978be3513824645902a84

cd tokio/tokio
RUSTFLAGS="-Ztreat-err-as-bug -Zcross-crate-inline-threshold=always -Zinline-mir-hint-threshold=10000 -Zinline-mir-threshold=10000" cargo b --release --features sync
error: internal compiler error: broken MIR in Item(DefId(0:1070 ~ tokio[56a2]::sync::broadcast::{impl#14}::blocking_recv)) (after phase change to runtime-optimized) at bb140[16]:
                                StorageLive(_326) which already has storage here
    --> tokio/src/sync/broadcast.rs:1255:13
     |
1255 |         fut.await
     |             ^^^^^

Remove -Ztreat-err-as-bug and add -Zvalidate-mir to get a lot of ICEs like this:
rustc-ice-2023-11-09T01_05_17-2728619.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    -Zvalidate-mirUnstable option: MIR validationA-coroutinesArea: CoroutinesA-mir-optArea: MIR optimizationsA-mir-opt-inliningArea: MIR inliningC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions