summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2016-04-21 19:49:29 +0000
committerKevin Enderby <enderby@apple.com>2016-04-21 19:49:29 +0000
commit19be251e1c03e4e8c0e5fb1856691dd5713325cf (patch)
treed0ec78ef2e5e6e4926d925901822374d9cc52f8b
parent3e2e69f60723bf2fff06f9bce9c546bc958c0b32 (diff)
downloadbcm5719-llvm-19be251e1c03e4e8c0e5fb1856691dd5713325cf.tar.gz
bcm5719-llvm-19be251e1c03e4e8c0e5fb1856691dd5713325cf.zip
Fix crash in llvm-objdump with -macho -objc-meta-data that was trying dump a non-existent section.
Showed up in running on a large binary with the missing section. I could create a fake test case if anyone really wants but the fix is pretty obvious. rdar://25837034 llvm-svn: 267037
-rw-r--r--llvm/tools/llvm-objdump/MachODump.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp
index e13c30bedd1..ecf6b359146 100644
--- a/llvm/tools/llvm-objdump/MachODump.cpp
+++ b/llvm/tools/llvm-objdump/MachODump.cpp
@@ -5134,6 +5134,9 @@ static void print_image_info32(SectionRef S, struct DisassembleInfo *info) {
struct objc_image_info32 o;
const char *r;
+ if (S == SectionRef())
+ return;
+
StringRef SectName;
S.getName(SectName);
DataRefImpl Ref = S.getRawDataRefImpl();
OpenPOWER on IntegriCloud