This is an archive of the discontinued LLVM Phabricator instance.

[dwarfdump] Fix off-by-one bug in accelerator table extractor.
ClosedPublic

Authored by JDevlieghere on Dec 11 2017, 3:37 AM.

Details

Summary

This fixes a bug where the verifier was complaining about empty
accelerator tables. When the table is empty, its size is not a valid
offset as it points after the end of the section.

This patch also makes the extractor return llvm:Error instead of bool
for better error reporting in the verifier.

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere created this revision.Dec 11 2017, 3:37 AM
JDevlieghere retitled this revision from [dwarfdump] AccelTable extractor return llvm:Error instead of bool to [dwarfdump] Fix off-by-one bug in accelerator table extractor..
JDevlieghere edited the summary of this revision. (Show Details)
aprantl accepted this revision.Dec 11 2017, 8:37 AM
This revision is now accepted and ready to land.Dec 11 2017, 8:37 AM
davide accepted this revision.Dec 11 2017, 8:56 AM
davide added a subscriber: davide.

LGTM.

This revision was automatically updated to reflect the committed changes.