diff options
Diffstat (limited to 'llvm/test')
17 files changed, 54 insertions, 9 deletions
diff --git a/llvm/test/Object/Inputs/macho-invalid-bind-overlap b/llvm/test/Object/Inputs/macho-invalid-bind-overlap Binary files differnew file mode 100644 index 00000000000..206315c3b5b --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-bind-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-codesig-overlap b/llvm/test/Object/Inputs/macho-invalid-codesig-overlap Binary files differnew file mode 100644 index 00000000000..a989bad05d1 --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-codesig-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-export-overlap b/llvm/test/Object/Inputs/macho-invalid-export-overlap Binary files differnew file mode 100644 index 00000000000..293191836c1 --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-export-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-extrefsyms-overlap b/llvm/test/Object/Inputs/macho-invalid-extrefsyms-overlap Binary files differnew file mode 100644 index 00000000000..5778f67a226 --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-extrefsyms-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-extreloff-overlap b/llvm/test/Object/Inputs/macho-invalid-extreloff-overlap Binary files differnew file mode 100644 index 00000000000..2226556183a --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-extreloff-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-hints-overlap b/llvm/test/Object/Inputs/macho-invalid-hints-overlap Binary files differnew file mode 100644 index 00000000000..87a62b825f9 --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-hints-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-indirectsyms-overlap b/llvm/test/Object/Inputs/macho-invalid-indirectsyms-overlap Binary files differnew file mode 100644 index 00000000000..f9748640d35 --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-indirectsyms-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-lazy_bind-overlap b/llvm/test/Object/Inputs/macho-invalid-lazy_bind-overlap Binary files differnew file mode 100644 index 00000000000..9905305428d --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-lazy_bind-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-locreloff-overlap b/llvm/test/Object/Inputs/macho-invalid-locreloff-overlap Binary files differnew file mode 100644 index 00000000000..be25c7938f0 --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-locreloff-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-modtab-overlap b/llvm/test/Object/Inputs/macho-invalid-modtab-overlap Binary files differnew file mode 100644 index 00000000000..4ee023c86ab --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-modtab-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-rebase-overlap b/llvm/test/Object/Inputs/macho-invalid-rebase-overlap Binary files differnew file mode 100644 index 00000000000..267afd65b01 --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-rebase-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-reloc-overlap b/llvm/test/Object/Inputs/macho-invalid-reloc-overlap Binary files differnew file mode 100644 index 00000000000..98fe3224cc8 --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-reloc-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-section-overlap b/llvm/test/Object/Inputs/macho-invalid-section-overlap Binary files differnew file mode 100644 index 00000000000..ab3f4fb3d8e --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-section-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-toc-overlap b/llvm/test/Object/Inputs/macho-invalid-toc-overlap Binary files differnew file mode 100644 index 00000000000..a3afa584255 --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-toc-overlap diff --git a/llvm/test/Object/Inputs/macho-invalid-weak_bind-overlap b/llvm/test/Object/Inputs/macho-invalid-weak_bind-overlap Binary files differnew file mode 100644 index 00000000000..ce1f3e0ac04 --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-weak_bind-overlap diff --git a/llvm/test/Object/macho-invalid.test b/llvm/test/Object/macho-invalid.test index 105bfb075f3..b193ebb8c41 100644 --- a/llvm/test/Object/macho-invalid.test +++ b/llvm/test/Object/macho-invalid.test @@ -439,3 +439,48 @@ INVALID-SYMTAB-OVERLAP: macho-invalid-symtab-overlap': truncated or malformed ob RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-strtab-overlap 2>&1 | FileCheck -check-prefix INVALID-STRTAB-OVERLAP %s INVALID-STRTAB-OVERLAP: macho-invalid-strtab-overlap': truncated or malformed object (string table at offset 60 with a size of 16, overlaps symbol table at offset 52 with a size of 12) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-section-overlap 2>&1 | FileCheck -check-prefix INVALID-SECTION-OVERLAP %s +INVALID-SECTION-OVERLAP: macho-invalid-section-overlap': truncated or malformed object (symbol table at offset 208 with a size of 12, overlaps section contents at offset 184 with a size of 32) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-reloc-overlap 2>&1 | FileCheck -check-prefix INVALID-RELOC-OVERLAP %s +INVALID-RELOC-OVERLAP: macho-invalid-reloc-overlap': truncated or malformed object (section relocation entries at offset 204 with a size of 8, overlaps section contents at offset 176 with a size of 32) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-toc-overlap 2>&1 | FileCheck -check-prefix INVALID-TOC-OVERLAP %s +INVALID-TOC-OVERLAP: macho-invalid-toc-overlap': truncated or malformed object (table of contents at offset 292 with a size of 8, overlaps section relocation entries at offset 288 with a size of 8) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-modtab-overlap 2>&1 | FileCheck -check-prefix INVALID-MODTAB-OVERLAP %s +INVALID-MODTAB-OVERLAP: macho-invalid-modtab-overlap': truncated or malformed object (module table at offset 300 with a size of 52, overlaps table of contents at offset 296 with a size of 8) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-extrefsyms-overlap 2>&1 | FileCheck -check-prefix INVALID-EXTREFSYMS-OVERLAP %s +INVALID-EXTREFSYMS-OVERLAP: macho-invalid-extrefsyms-overlap': truncated or malformed object (reference table at offset 352 with a size of 4, overlaps module table at offset 304 with a size of 52) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-indirectsyms-overlap 2>&1 | FileCheck -check-prefix INVALID-INDIRECTSYMS-OVERLAP %s +INVALID-INDIRECTSYMS-OVERLAP: macho-invalid-indirectsyms-overlap': truncated or malformed object (indirect table at offset 364 with a size of 4, overlaps section contents at offset 364 with a size of 4) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-extreloff-overlap 2>&1 | FileCheck -check-prefix INVALID-EXTRELOFF-OVERLAP %s +INVALID-EXTRELOFF-OVERLAP: macho-invalid-extreloff-overlap': truncated or malformed object (external relocation table at offset 424 with a size of 8, overlaps reference table at offset 424 with a size of 4) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-locreloff-overlap 2>&1 | FileCheck -check-prefix INVALID-LOCRELOFF-OVERLAP %s +INVALID-LOCRELOFF-OVERLAP: macho-invalid-locreloff-overlap': truncated or malformed object (local relocation table at offset 432 with a size of 8, overlaps external relocation table at offset 428 with a size of 8) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-hints-overlap 2>&1 | FileCheck -check-prefix INVALID-HINTS-OVERLAP %s +INVALID-HINTS-OVERLAP: macho-invalid-hints-overlap': truncated or malformed object (two level hints at offset 104 with a size of 4, overlaps Mach-O headers at offset 0 with a size of 108) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-codesig-overlap 2>&1 | FileCheck -check-prefix INVALID-CODESIG-OVERLAP %s +INVALID-CODESIG-OVERLAP: macho-invalid-codesig-overlap': truncated or malformed object (code signature data at offset 40 with a size of 32, overlaps Mach-O headers at offset 0 with a size of 48) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-rebase-overlap 2>&1 | FileCheck -check-prefix INVALID-REBASE-OVERLAP %s +INVALID-REBASE-OVERLAP: macho-invalid-rebase-overlap': truncated or malformed object (dyld rebase info at offset 72 with a size of 32, overlaps Mach-O headers at offset 0 with a size of 80) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-bind-overlap 2>&1 | FileCheck -check-prefix INVALID-BIND-OVERLAP %s +INVALID-BIND-OVERLAP: macho-invalid-bind-overlap': truncated or malformed object (dyld bind info at offset 104 with a size of 32, overlaps dyld rebase info at offset 80 with a size of 32) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-weak_bind-overlap 2>&1 | FileCheck -check-prefix INVALID-WEAK_BIND-OVERLAP %s +INVALID-WEAK_BIND-OVERLAP: macho-invalid-weak_bind-overlap': truncated or malformed object (dyld weak bind info at offset 136 with a size of 32, overlaps dyld bind info at offset 112 with a size of 32) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-lazy_bind-overlap 2>&1 | FileCheck -check-prefix INVALID-LAZY_BIND-OVERLAP %s +INVALID-LAZY_BIND-OVERLAP: macho-invalid-lazy_bind-overlap': truncated or malformed object (dyld lazy bind info at offset 168 with a size of 32, overlaps dyld weak bind info at offset 144 with a size of 32) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-export-overlap 2>&1 | FileCheck -check-prefix INVALID-EXPORT-OVERLAP %s +INVALID-EXPORT-OVERLAP: macho-invalid-export-overlap': truncated or malformed object (dyld export info at offset 200 with a size of 32, overlaps dyld lazy bind info at offset 176 with a size of 32) diff --git a/llvm/test/tools/llvm-objdump/X86/malformed-machos.test b/llvm/test/tools/llvm-objdump/X86/malformed-machos.test index 9ada3ef0abe..499c23e09d2 100644 --- a/llvm/test/tools/llvm-objdump/X86/malformed-machos.test +++ b/llvm/test/tools/llvm-objdump/X86/malformed-machos.test @@ -7,17 +7,17 @@ # m0001: mem-crup-0001.macho': truncated or malformed object (addr field plus size of section 2 in LC_SEGMENT_64 command 0 greater than than the segment's vmaddr plus vmsize) -# RUN: llvm-objdump -macho -objc-meta-data \ -# RUN: %p/Inputs/malformed-machos/mem-crup-0006.macho \ +# RUN: not llvm-objdump -macho -objc-meta-data \ +# RUN: %p/Inputs/malformed-machos/mem-crup-0006.macho 2>&1 \ # RUN: | FileCheck -check-prefix=m0006 %s -# m0006: ivarLayout 0x8 +# m0006: malformed-machos/mem-crup-0006.macho': truncated or malformed object (section contents at offset 4128 with a size of 176, overlaps section contents at offset 4128 with a size of 8) -# RUN: llvm-objdump -macho -objc-meta-data \ -# RUN: %p/Inputs/malformed-machos/mem-crup-0006.macho \ +# RUN: not llvm-objdump -macho -objc-meta-data \ +# RUN: %p/Inputs/malformed-machos/mem-crup-0010.macho 2>&1 \ # RUN: | FileCheck -check-prefix=m0010 %s -# m0010: 00000000000010e0 0x10e8 _OBJC_CLASS_ +# m0010: mem-crup-0010.macho': truncated or malformed object (section contents at offset 4320 with a size of 80, overlaps section contents at offset 4320 with a size of 8) # RUN: not llvm-objdump -macho -objc-meta-data \ # RUN: %p/Inputs/malformed-machos/mem-crup-0040.macho 2>&1 \ @@ -34,8 +34,8 @@ # RUN: llvm-objdump -macho -objc-meta-data \ # RUN: %p/Inputs/malformed-machos/mem-crup-0261.macho -# RUN: llvm-objdump -macho -disassemble \ -# RUN: %p/Inputs/malformed-machos/mem-crup-0337.macho \ +# RUN: not llvm-objdump -macho -disassemble \ +# RUN: %p/Inputs/malformed-machos/mem-crup-0337.macho 2>&1 \ # RUN: | FileCheck -check-prefix=m0337 %s -# m0337: subq $16, %rsp +# m0337: mem-crup-0337.macho': truncated or malformed object (section relocation entries at offset 0 with a size of 512, overlaps Mach-O headers at offset 0 with a size of 2048) |