Add the rest of the additional error checks for invalid Mach-O files when
authorKevin Enderby <enderby@apple.com>
Wed, 2 Nov 2016 21:08:39 +0000 (21:08 +0000)
committerKevin Enderby <enderby@apple.com>
Wed, 2 Nov 2016 21:08:39 +0000 (21:08 +0000)
commitfbebe1632aaa0f5cc52a4d902cc80eb9b97efa6a
tree38ea8aa88bb571974f222d1db9cd230b11e41fd7
parent807c699bbba1ed813a8466bf087adb6f8ab6c289
Add the rest of the additional error checks for invalid Mach-O files when
the offsets and sizes of an element of the Mach-O file overlaps with
another element in the Mach-O file.

Some other tests for malformed Mach-O files now run into these
checks so their tests were also adjusted.

llvm-svn: 285860
18 files changed:
llvm/lib/Object/MachOObjectFile.cpp
llvm/test/Object/Inputs/macho-invalid-bind-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-codesig-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-export-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-extrefsyms-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-extreloff-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-hints-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-indirectsyms-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-lazy_bind-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-locreloff-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-modtab-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-rebase-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-reloc-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-section-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-toc-overlap [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-weak_bind-overlap [new file with mode: 0644]
llvm/test/Object/macho-invalid.test
llvm/test/tools/llvm-objdump/X86/malformed-machos.test