Skip to content

Conversation

@EricRahm
Copy link
Collaborator

A malformed DWARF5 file with an address_size of 0 in the .debug_line header would cause an assertion failure. This happened in LineInfoReader::SeekToOffset when comparing against the compile unit address size.

This change replaces the assertion with a THROW, allowing Bloaty to exit gracefully with a clear error message instead of crashing.

A new lit test creates a minimal reproduction of the malformed DWARF to verify the fix.

Fixes #448

A malformed DWARF5 file with an address_size of 0 in the .debug_line
header would cause an assertion failure. This happened in
`LineInfoReader::SeekToOffset` when comparing against the compile unit
address size.

This change replaces the assertion with a THROW, allowing Bloaty to exit
gracefully with a clear error message instead of crashing.

A new lit test creates a minimal reproduction of the malformed DWARF to
verify the fix.

Fixes google#448
@EricRahm EricRahm merged commit dc38561 into google:main Nov 21, 2025
9 checks passed
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

Successfully merging this pull request may close these issues.

OSS-Fuzz issue 458585559

1 participant