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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 08:15:37 PDT 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: rupprecht, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

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.


https://reviews.llvm.org/D83559

Files:
  llvm/test/Object/Inputs/invalid-phdr.elf
  llvm/test/Object/elf-invalid-phdr.test
  llvm/test/Object/invalid.test
  llvm/test/tools/llvm-objdump/ELF/invalid-phdr.test
  llvm/tools/llvm-objdump/ELFDump.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83559.277049.patch
Type: text/x-patch
Size: 4610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200710/19a92b7d/attachment.bin>


More information about the llvm-commits mailing list