-
Notifications
You must be signed in to change notification settings - Fork 108
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
Error "Found an abbreviation code that has already been used" #668
Comments
Can you provide a file that this occurs for, or otherwise provide steps to reproduce the error? Do other tools work on the file, such as llvm-dwarfdump? |
llvm-dwarfdump crashes as well:
I'll try to send a repro. |
I can reproduce on another project that I can share. This time llvm-dwarfdump doesn't crash, it stops with:
See debug-58a3a4f8-21c4-49da-936c-974edf11f21d.wasm.zip Since llvm-dwarfdump also failed to decode DWARF, this is more a Rust issue no? |
Yes, I'll have a look later, but it sounds like this is a bug in the compiler producing the DWARF, and it is correct for gimli to give an error for this. |
Should I report the issue to Rust, since it seems to be emitting invalid DWARF? |
Yes, this looks like a compiler bug or linker bug. The .debug_abbrev section is missing the final null code byte at the end of an abbreviation list for the first unit, so gimli continues parsing the abbreviations for the following unit and encounters a duplicate. Additionally, the abbreviation offset for the second unit is set as if there was an null code byte (the duplicate occurs at offset 0x27c, but the second unit specifies an abbrev_offset of 0x27d), so parsing abbreviations for the second unit fails due to an invalid DW_CHILDREN value. |
Hi,
When compiling from Rust to Wasm, the DWARF info are sometimes invalid to gimli and throw "Found an abbreviation code that has already been used". It seems to happen only with larger codebases and I don't have a good way to reproduce at the moment.
Is that a know issue by any chance? Please let me know what you need to debug.
The text was updated successfully, but these errors were encountered: