-
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
Broken LLVM module: inlinable function call in a function with debug info must have a !dbg location #135332
Comments
That landed in 1.83 so probably not. We can try to bisect, but 5 minutes per step does not sound like a fun time 😓. |
Ah sorry, misread the tag in the commit view.
Took about 1 hour, not that bad. searched nightlies: from nightly-2024-10-13 to nightly-2024-11-22 bisected with cargo-bisect-rustc v0.6.9Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start 1.83.0 --end 1.84.0 -- build --profile maxperf --bin forge I then bisected b026d85 ... 1.84.0 with
So:
And in fact building with |
If you run your |
Unless these tests are skipped in CI, the answer is no. |
The usual way to fix this error (assuming that there genuinely no better location that can be attached) is to add a 0-line DILocation. https://reviews.llvm.org/D133095 is one case where I encountered this error before. |
Yeah, that's what I plan to do, but I would like to understand the pattern that causes this error if the tests don't. |
Managed to create a smaller reproducer here: https://github.com/DaniPopes/rust-bug-135332 |
Code
I tried this code foundry-rs/foundry@0cc5355:
git clone https://github.com/foundry-rs/foundry.git git checkout 0cc535504a909dcee74694fa86f7faafa4cbf4bc cargo +stable build --bin forge --profile maxperf # takes a while (>5 min)
I expected to see this happen: compiles like with dev or release profile
Instead, this happened (see https://github.com/foundry-rs/foundry/actions/runs/12700786553/job/35404155023#step:7:3652):
This is caused by the following config combination, as changing any of these values makes it compile again:
I've also verified that the
strip
value does not affect the outcome either.We fixed this by setting
debug = "none"
.Maybe related to #129063, which modified the function mentioned in the error?I could reproduce this locally only on 1.84, not on beta or nightly, so feel free to close this if it has already been fixed.Reproducible withRUSTFLAGS="-Zverify-llvm-ir"
, see #135332 (comment).Unfortunately I wasn't able to minimize this.
Version it worked on
It most recently worked on: 1.83.0
Version with regression
rustc --version --verbose
:@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged
The text was updated successfully, but these errors were encountered: