This is an archive of the discontinued LLVM Phabricator instance.

[test/Object][llvm-objdump] - llvm-objdump: don't abort() when the e_phoff field is invalid and refine testing.
ClosedPublic

Authored by grimar on Jul 10 2020, 8:15 AM.

Details

Summary

llvm-objdump currently calls report_fatal_error() when the e_phoff field is invalid.

This is tested by elf-invalid-phdr.test which has the following issues:

  1. It uses a precompiled object.
  2. it could be a part of invalid.test.
  3. It tests the Object lib, but we have no separate test for llvm-objdump.

This patch addresses issues mentioned.

Diff Detail

Event Timeline

grimar created this revision.Jul 10 2020, 8:15 AM
Herald added a project: Restricted Project. · View Herald Transcript
MaskRay accepted this revision.Jul 10 2020, 4:36 PM

Thanks!

This revision is now accepted and ready to land.Jul 10 2020, 4:36 PM
jhenderson accepted this revision.Jul 13 2020, 1:37 AM

LGTM too!

This revision was automatically updated to reflect the committed changes.