This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Avoid crashing on an invalid section identifier.
ClosedPublic

Authored by ikudrin on Mar 4 2020, 6:55 AM.

Details

Summary

A DWARFSectionKind is read from input. It is not validated on parsing, so an unexpected value may result in reaching llvm_unreachable() in DWARFUnitIndex::getColumnHeader() when dumping the index section.

Diff Detail

Event Timeline

ikudrin created this revision.Mar 4 2020, 6:55 AM
dblaikie accepted this revision.Mar 4 2020, 9:33 AM

Looks ok - bonus points if someone includes the actual number (the same way llvm-dwarfdump prints unknown TAGs, for instance) somewhere, rather than the opaque "unknown" value.

This revision is now accepted and ready to land.Mar 4 2020, 9:33 AM

Thanks! I'll make a follow-up for that.

This revision was automatically updated to reflect the committed changes.