This is an archive of the discontinued LLVM Phabricator instance.

[MachO] Fix detecting malformed DWARF.
ClosedPublic

Authored by ikudrin on Dec 16 2019, 6:34 AM.

Details

Summary

This fixes an invalid constant used to detect the reserved range when reading the compilation unit header.

See also: D64622 and D65039.

Diff Detail

Event Timeline

ikudrin created this revision.Dec 16 2019, 6:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2019, 6:34 AM
probinson accepted this revision.Dec 16 2019, 6:50 AM
probinson added a subscriber: probinson.

LGTM

This revision is now accepted and ready to land.Dec 16 2019, 6:50 AM
This revision was automatically updated to reflect the committed changes.

Was this fixing an existing buildbot/test failure? (if not, it should probably have a test? If it did fix an existing failure - could you mention what that failure was?)

Was this fixing an existing buildbot/test failure? (if not, it should probably have a test? If it did fix an existing failure - could you mention what that failure was?)

The main issue was that some valid length values were wrongly interpreted as reserved, which come from inconsistency in the DWARF3 documentation which was fixed in DWARF4. See D64622 and http://lists.dwarfstd.org/pipermail/dwarf-discuss-dwarfstd.org/2008-June/003343.html for more details.

I have created D72695 for the test.