Skip to content
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

mold produces corrupted compressed debug sections for i386 #361

Closed
sicherha opened this issue Feb 23, 2022 · 0 comments
Closed

mold produces corrupted compressed debug sections for i386 #361

sicherha opened this issue Feb 23, 2022 · 0 comments

Comments

@sicherha
Copy link
Contributor

How to reproduce:

echo 'int main() { return 0; }' | cc -m32 -B. -o exe -g -gz -xc -
dwarfdump exe | grep -i error
readelf --sections exe > /dev/null

dwarfdump output:

dwarfdump ERROR:  ERROR: Failure reading CU header or DIE, corrupt DWARF:  DW_DLE_UNKNOWN_FORM: Abbrev form 0x2 DW_DLE_UNKNOWN_FORM(really unknown attr): Abbrev form 0x2 with attribute 0x0 so abbreviations unusable. . Attempting to continue.
dwarfdump ERROR:  printing .debug_info had a problem.:  DW_DLE_UNKNOWN_FORM: Abbrev form 0x2 DW_DLE_UNKNOWN_FORM(really unknown attr): Abbrev form 0x2 with attribute 0x0 so abbreviations unusable. . Attempting to continue.
ERROR: dwarf_offdie() gets a return of error  finding the compilation-unit DIE for arange number 0 and that should never happen. fails. Major error
dwarfdump ERROR:  printing the aranges section had a problem.:  DW_DLE_UNKNOWN_FORM: Abbrev form 0x2 DW_DLE_UNKNOWN_FORM(really unknown attr): Abbrev form 0x2 with attribute 0x0 so abbreviations unusable. . Attempting to continue.
There were 4 DWARF errors reported: see ERROR above.

readelf output:

readelf: exe: Error: .debug_abbrev section not zero terminated
readelf: exe: Warning: DIE at offset 0xc refers to abbreviation number 1 which does not exist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant