-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
ICE: Failed to encode discriminator in DILocation
#132900
Comments
Corresponded PR: #132613 |
cc @khuey but we really need a reproduction for this otherwise there's not much we can do here, it'll be guess work at best which is not very actionable. |
We could fix the ICE pretty easily (by dropping debug information when we hit this case). But it would be good to verify that this really is a case with a proc-macro that ends up with the same function inlined into it a huge number of times first. |
@Millione If you get some time to work on the minimization here, it will significantly improve the odds that we can fix this without losing debuginfo unnecessarily, and in general interesting reproduction cases make rustc's test suite more resilient. |
Hi everyone, I have constructed a minimal code base to reproduce this bug. This bug must be triggered by a function call with more than 4096 lines of code and containing macro expansion in the parameters. Because the code file is long, I submitted it to this repository: https://github.com/buaazp/rust-bug. The repository contains the replica code and generation script for comparison testing. Once the function is less than or equal to 4096 lines, rustc will not panic. You can give it a try and contact me anytime if you have any questions. |
Thanks, I'll take a look. That this happens without a proc-macro is unexpected. |
Ok, it's unexpected to me because I misunderstood how macro Spans work. I'll write a PR. |
@rustbot claim |
… with dummy spans instead of not emitting locations at all when the correct location discriminator value exceeds LLVM's capacity.
… with dummy spans instead of not emitting locations at all when the correct location discriminator value exceeds LLVM's capacity.
Code
Can not reproduce it with minimized code for now, and the whole repository is private.
Update: Thanks for @buaazp providing a minimal reproduce codebase https://github.com/buaazp/rust-bug.
Meta
rustc --version --verbose
:Error output
Backtrace
rustc-ice-2024-11-11T12_30_37-1345317.txt
The text was updated successfully, but these errors were encountered: