Report fatal errors instead of segfaulting/asserting on a few invalid accesses while...
authorFilipe Cabecinhas <me@filcab.net>
Thu, 15 Jan 2015 22:52:38 +0000 (22:52 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Thu, 15 Jan 2015 22:52:38 +0000 (22:52 +0000)
commit018347762188a984d9c76dfb68b6140261b99f2c
treedc3a824d48d0d60b67e1d87eec9babb11fef4b3c
parent07e3f81e931605d2cdc853c583b61e99defae4c6
Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files.

Summary:
Shift an older “invalid file” test to get a consistent naming for these tests.

Bugs found by afl-fuzz

Reviewers: rafael

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6945

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226219 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
lib/Object/MachOObjectFile.cpp
test/Object/Inputs/macho-invalid-bad-symbol-index [new file with mode: 0644]
test/Object/Inputs/macho-invalid-getsection-index [new file with mode: 0644]
test/Object/Inputs/macho-invalid-no-size-for-sections [new file with mode: 0644]
test/Object/Inputs/macho-invalid-section-index-getSectionRawFinalSegmentName [new file with mode: 0644]
test/Object/Inputs/macho-invalid-section-index-getSectionRawName [new file with mode: 0644]
test/Object/Inputs/macho-invalid-symbol-name-past-eof [new file with mode: 0644]
test/Object/Inputs/macho-invalid-too-small-load-command [new file with mode: 0644]
test/Object/Inputs/macho-invalid-too-small-segment-load-command [new file with mode: 0644]
test/Object/Inputs/macho-invalid-zero-ncmds [new file with mode: 0644]
test/Object/Inputs/macho-zero-ncmds [deleted file]
test/Object/Inputs/macho64-invalid-getsection-index [new file with mode: 0644]
test/Object/Inputs/macho64-invalid-incomplete-load-command [new file with mode: 0644]
test/Object/Inputs/macho64-invalid-no-size-for-sections [new file with mode: 0644]
test/Object/Inputs/macho64-invalid-too-small-load-command [new file with mode: 0644]
test/Object/Inputs/macho64-invalid-too-small-segment-load-command [new file with mode: 0644]
test/Object/macho-invalid.test [new file with mode: 0644]
test/Object/objdump-macho-quirks.test [deleted file]