This is an archive of the discontinued LLVM Phabricator instance.

[DWARF] Check that all fields of a Unit Header are read.
ClosedPublic

Authored by ikudrin on Dec 19 2019, 6:45 AM.

Details

Summary

Tests dwarfdump-rnglists-dwarf64.s and dwarfdump-rnglists.s were malformed because they had missing required DWO ID fields in split compilation unit headers. The patch fixes the tests and checks the reading of a unit header more thoroughly.

Diff Detail

Event Timeline

ikudrin created this revision.Dec 19 2019, 6:45 AM

might be worth keeping/duplicating one of the bad test cases to show the new & improved error handling?

ikudrin updated this revision to Diff 234850.Dec 20 2019, 2:47 AM
  • Add a test for a CU with missing fields which was considered valid before the patch.
dblaikie accepted this revision.Dec 23 2019, 5:01 PM

Sounds good - thanks!

This revision is now accepted and ready to land.Dec 23 2019, 5:01 PM
This revision was automatically updated to reflect the committed changes.