-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Specific code layout can cause compiler panic with lto=true #59137
Comments
Can you setup a repo with the example? |
Also happens on debug when |
Has nothing to do with child. When you delete it, the ICE is still present. |
rust/src/librustc_codegen_llvm/back/link.rs Lines 1399 to 1401 in 2a8f6a7
|
Thanks for the bug report, @GinjaNinja32! And thanks for already taking a look, @hellow554! I suspect this is related to using Nominating for priority assignment. |
triage: P-high. Leaving nominated for discussion at meeting. |
discussed at meeting. assigning to @michaelwoerister |
and removing nomination tag |
The assertion here seems to be out of place. #59696 removes it which should fix the issue. |
…=alexcrichton Remove invalid assertion back::link::from add_upstream_rust_crates(). This removes a misplaced assertion. The function containing the assertion is actually only ever called for upstream crates that are not considered for LTO, so we don't care whether upstream code has been merged in by LTO or not. Fixes rust-lang#59137 r? @alexcrichton
…=alexcrichton Remove invalid assertion back::link::from add_upstream_rust_crates(). This removes a misplaced assertion. The function containing the assertion is actually only ever called for upstream crates that are not considered for LTO, so we don't care whether upstream code has been merged in by LTO or not. Fixes rust-lang#59137 r? @alexcrichton
…=alexcrichton Remove invalid assertion back::link::from add_upstream_rust_crates(). This removes a misplaced assertion. The function containing the assertion is actually only ever called for upstream crates that are not considered for LTO, so we don't care whether upstream code has been merged in by LTO or not. Fixes rust-lang#59137 r? @alexcrichton
The specific setup I'm seeing to cause this is a three-crate workspace:
parent
, a binary, depending onshared
child
, a library, withcrate-type = ["dylib"]
, depending onshared
shared
, a library, also withcrate-type = ["dylib"]
For my specific use case, there are many crates like
child
, andparent
loads them dynamically vialibloading
, but this is not required to reproduce the panic.Script to create this (place in empty directory and run)
I expected to see this happen: Either a successful build, or a standard compiler error.
Instead, this happened: LTO broke the compiler:
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: