llvm-project/llvm/tools/llvm-objdump
Kevin Enderby a59824a174 Fix two bugs in llvm-objdump’s printing of Objective-C meta data
from malformed Mach-O files that caused crashes.

We recently got about 700 malformed Mach-O files which we have
been using the improve the robustness of tools that deal with reading
data from object files.  These resulted in about 20 small bug fixes to
the darwin based tools.

The goal here is to also improve the robustness of llvm-objdump and
this is the first two fixes.  In talking with Tim Northover the approach
we thought might be best is to:

1) Only include tests for the malformed Mach-O files that cause crashes
(not all 700+ tests).
2) The test should only contain the command line option that caused the
crash and not all the others that don’t matter.
3) There should be only one line for the FileCheck that is past the point
of the crash if possible and if possible indicates the malformation.

Again the goal is to fix crashes and not so much care about how the
printing of malformed data comes out.

Tim also suggested if we really wanted to add test cases for all 700+
malformed Mach-O files putting them in the regression tests might be
an option.  But many of these do not cause crashes.

llvm-svn: 249479
2015-10-06 22:27:08 +00:00
..
CMakeLists.txt llvm/tools/llvm-objdump/CMakeLists.txt: Update libdeps to fix r240304. 2015-06-23 00:59:12 +00:00
COFFDump.cpp Use makeArrayRef or None to avoid unnecessarily mentioning the ArrayRef type extra times. NFC 2015-09-21 05:32:41 +00:00
ELFDump.cpp Simplify iterating over program headers and detect corrupt ones. 2015-07-20 13:35:33 +00:00
LLVMBuild.txt Move DebugInfo to DebugInfo/DWARF. 2015-01-30 18:07:45 +00:00
MachODump.cpp Fix two bugs in llvm-objdump’s printing of Objective-C meta data 2015-10-06 22:27:08 +00:00
Makefile Move DebugInfo to DebugInfo/DWARF. 2015-01-30 18:07:45 +00:00
llvm-objdump.cpp [PATCH] D13360: [llvm-objdump] Teach -d about AArch64 mapping symbols 2015-10-01 21:57:09 +00:00
llvm-objdump.h [llvm-objdump] Call exit(1) on error, i.e. fail early. 2015-08-05 07:18:31 +00:00