mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +00:00
Fix a bug in llvm-obdump(1) with the -objc-meta-data flag with -macho
which caused a hang on a malformed binary with bad bind info. rdar://29672108 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294021 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
da9f518360
commit
b6a21d0438
BIN
test/tools/llvm-objdump/X86/Inputs/macho-invalid-bind-entry
Normal file
BIN
test/tools/llvm-objdump/X86/Inputs/macho-invalid-bind-entry
Normal file
Binary file not shown.
@ -63,3 +63,6 @@ INVALID-SYMBOL-STRX-UNIVERSAL: macho-invalid-symbol-strx-universal' (for archite
|
||||
|
||||
RUN: not llvm-objdump -macho -disassemble %p/Inputs/macho-invalid-symbol-lib_ordinal 2>&1 | FileCheck -check-prefix INVALID-SYMBOL-LIB_ORDINAL %s
|
||||
INVALID-SYMBOL-LIB_ORDINAL: macho-invalid-symbol-lib_ordinal': truncated or malformed object (bad library ordinal: 7 for symbol at index 2)
|
||||
|
||||
RUN: llvm-objdump -macho -objc-meta-data %p/Inputs/macho-invalid-bind-entry | FileCheck -check-prefix INVALID-BIND-ENTRY %s
|
||||
INVALID-BIND-ENTRY: 0000000100020c90 0x2d0409887202e473
|
||||
|
@ -9579,7 +9579,7 @@ static const char *get_dyld_bind_info_symbolname(uint64_t ReferenceValue,
|
||||
uint32_t SegIndex = Entry.segmentIndex();
|
||||
uint64_t OffsetInSeg = Entry.segmentOffset();
|
||||
if (!sectionTable.isValidSegIndexAndOffset(SegIndex, OffsetInSeg))
|
||||
continue;
|
||||
return nullptr;
|
||||
uint64_t Address = sectionTable.address(SegIndex, OffsetInSeg);
|
||||
StringRef name = Entry.symbolName();
|
||||
if (!name.empty())
|
||||
|
Loading…
Reference in New Issue
Block a user