1 // An odd Mach-O file, with just a mach header with all but the magic field
2 // and filetype zeros. The cputype and cpusubtype fields being zero are invalid,
3 // but that does not mater for the most part to display some of the contents.
4 RUN: llvm-objdump --private-headers %p/Inputs/macho-invalid-zero-ncmds --macho \
5 RUN: | FileCheck -check-prefix ZERO-NCMDS %s
6 ZERO-NCMDS: MH_MAGIC_64 0 0 0x00 OBJECT 0 0 0x00000000
8 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho64-invalid-incomplete-load-command 2>&1 \
9 RUN: | FileCheck -check-prefix INCOMPLETE-LOADC %s
10 INCOMPLETE-LOADC: truncated or malformed object (load command 0 extends past the end all load commands in the file)
12 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho64-invalid-incomplete-load-command.1 2>&1 \
13 RUN: | FileCheck -check-prefix INCOMPLETE-LOADC-1 %s
14 INCOMPLETE-LOADC-1: truncated or malformed object (load command 1 extends past the end all load commands in the file)
16 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-too-small-load-command 2>&1 \
17 RUN: | FileCheck -check-prefix SMALL-LOADC-SIZE %s
18 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho64-invalid-too-small-load-command 2>&1 \
19 RUN: | FileCheck -check-prefix SMALL-LOADC-SIZE %s
20 SMALL-LOADC-SIZE: truncated or malformed object (load commands extend past the end of the file)
22 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho64-invalid-too-small-load-command.1 2>&1 \
23 RUN: | FileCheck -check-prefix SMALL-LOADC-SIZE-1 %s
24 SMALL-LOADC-SIZE-1: truncated or malformed object (load command 1 with size less than 8 bytes)
26 RUN: not llvm-objdump --private-headers %p/Inputs/macho-invalid-too-small-segment-load-command 2>&1 \
27 RUN: | FileCheck -check-prefix MULTIPLE-NOT-4 %s
28 MULTIPLE-NOT-4: truncated or malformed object (load command 0 cmdsize not a multiple of 4)
30 RUN: not llvm-objdump --private-headers %p/Inputs/macho-invalid-too-small-segment-load-command.1 2>&1 \
31 RUN: | FileCheck -check-prefix SMALL-SEGLOADC-SIZE %s
32 SMALL-SEGLOADC-SIZE: truncated or malformed object (load command 0 LC_SEGMENT cmdsize too small)
34 RUN: not llvm-objdump --private-headers %p/Inputs/macho64-invalid-too-small-segment-load-command 2>&1 \
35 RUN: | FileCheck -check-prefix MULTIPLE-NOT-8 %s
36 MULTIPLE-NOT-8: truncated or malformed object (load command 0 cmdsize not a multiple of 8)
38 RUN: not llvm-objdump --private-headers %p/Inputs/macho-invalid-no-size-for-sections 2>&1 \
39 RUN: | FileCheck -check-prefix TOO-MANY-SECTS %s
40 TOO-MANY-SECTS: truncated or malformed object (load command 0 inconsistent cmdsize in LC_SEGMENT for the number of sections)
41 RUN: not llvm-objdump --private-headers %p/Inputs/macho64-invalid-no-size-for-sections 2>&1 \
42 RUN: | FileCheck -check-prefix TOO-MANY-SECTS-64 %s
43 TOO-MANY-SECTS-64: truncated or malformed object (load command 0 inconsistent cmdsize in LC_SEGMENT_64 for the number of sections)
45 RUN: not llvm-objdump --macho -t %p/Inputs/macho-invalid-bad-symbol-index 2>&1 \
46 RUN: | FileCheck -check-prefix BAD-SYMBOL %s
47 BAD-SYMBOL: truncated or malformed object (ilocalsym plus nlocalsym in LC_DYSYMTAB load command extends past the end of the symbol table)
48 RUN: llvm-objdump --macho -t %p/Inputs/macho-valid-0-nsyms 2>&1 \
49 RUN: | FileCheck -check-prefix ZERO-NSYMS %s
50 ZERO-NSYMS: SYMBOL TABLE
52 RUN: not llvm-objdump -t %p/Inputs/macho-invalid-symbol-name-past-eof 2>&1 \
53 RUN: | FileCheck -check-prefix NAME-PAST-EOF %s
54 NAME-PAST-EOF: truncated or malformed object (bad string index: 4261412866 for symbol at index 0)
55 RUN: llvm-nm -pa %p/Inputs/macho-invalid-symbol-name-past-eof 2>&1 \
56 RUN: | FileCheck -check-prefix NAME-PAST-EOF-nm-pa %s
57 NAME-PAST-EOF-nm-pa: 0000000000000000 - 00 0000 SO bad string index
58 RUN: llvm-nm -pax %p/Inputs/macho-invalid-symbol-name-past-eof 2>&1 \
59 RUN: | FileCheck -check-prefix NAME-PAST-EOF-nm-pax %s
60 NAME-PAST-EOF-nm-pax: 0000000000000000 64 00 0000 fe000002 bad string index
62 RUN: not llvm-objdump -t %p/Inputs/macho-bad-archive1.a 2>&1 \
63 RUN: | FileCheck -check-prefix NAME-PAST-EOF-ARCHIVE %s
64 NAME-PAST-EOF-ARCHIVE: macho-bad-archive1.a(macho-invalid-symbol-name-past-eof): truncated or malformed object (bad string index: 4261412866 for symbol at index 0)
66 RUN: not llvm-objdump --macho --arch=all -t %p/Inputs/macho-universal-bad1.x86_64.i386 2>&1 \
67 RUN: | FileCheck -check-prefix NAME-PAST-EOF-FAT %s
68 NAME-PAST-EOF-FAT: macho-universal-bad1.x86_64.i386' (for architecture x86_64): truncated or malformed object (bad string index: 4261412866 for symbol at index 0)
69 RUN: not llvm-objdump --macho --arch=all -t %p/Inputs/macho-universal-archive-bad1.x86_64.i386 2>&1 \
70 RUN: | FileCheck -check-prefix NAME-PAST-EOF-FAT-ARCHIVE %s
71 NAME-PAST-EOF-FAT-ARCHIVE: macho-universal-archive-bad1.x86_64.i386(macho-invalid-symbol-name-past-eof) (for architecture x86_64): truncated or malformed object (bad string index: 4261412866 for symbol at index 0)
73 RUN: llvm-nm %p/Inputs/macho-invalid-section-index-getSectionRawName 2>&1 \
74 RUN: | FileCheck -check-prefix INVALID-SECTION-IDX-SYMBOL-SEC %s
75 INVALID-SECTION-IDX-SYMBOL-SEC: 0000000100000000 S __mh_execute_header
76 RUN: llvm-nm -m %p/Inputs/macho-invalid-section-index-getSectionRawName 2>&1 \
77 RUN: | FileCheck -check-prefix INVALID-SECTION-IDX-SYMBOL-SEC-m %s
78 INVALID-SECTION-IDX-SYMBOL-SEC-m: 0000000100000000 (?,?) [referenced dynamically] external __mh_execute_header
79 RUN: llvm-nm -pax %p/Inputs/macho-invalid-section-index-getSectionRawName 2>&1 \
80 RUN: | FileCheck -check-prefix INVALID-SECTION-IDX-SYMBOL-SEC-pax %s
81 INVALID-SECTION-IDX-SYMBOL-SEC-pax: 0000000100000000 0f 42 0010 00000065 __mh_execute_header
82 RUN: not llvm-objdump -t %p/Inputs/macho-invalid-section-index-getSectionRawName 2>&1 \
83 RUN: | FileCheck -check-prefix INVALID-SECTION-IDX-SYMBOL-SEC-objdump %s
84 INVALID-SECTION-IDX-SYMBOL-SEC-objdump: truncated or malformed object (bad section index: 66 for symbol at index 8)
86 RUN: llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-header 2>&1 | FileCheck --check-prefix=INVALID-HEADER %s
87 INVALID-HEADER: is not an object file
89 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho64-invalid-incomplete-segment-load-command 2>&1 | FileCheck --check-prefix=INCOMPLETE-SEGMENT-LOADC %s
90 INCOMPLETE-SEGMENT-LOADC: truncated or malformed object (load commands extend past the end of the file)
92 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-bad-archive2.a 2>&1 | FileCheck --check-prefix=INCOMPLETE-SEGMENT-LOADC-ARCHIVE %s
93 INCOMPLETE-SEGMENT-LOADC-ARCHIVE: macho-bad-archive2.a(macho64-invalid-incomplete-segment-load-command): truncated or malformed object (load commands extend past the end of the file)
95 RUN: not llvm-objdump --macho --private-headers --arch=all %p/Inputs/macho-universal-bad2.x86_64.i386 2>&1 | FileCheck --check-prefix=INCOMPLETE-SEGMENT-LOADC-FAT %s
96 INCOMPLETE-SEGMENT-LOADC-FAT: macho-universal-bad2.x86_64.i386' (for architecture x86_64): truncated or malformed object (load commands extend past the end of the file)
98 RUN: not llvm-objdump --macho --private-headers --arch=all %p/Inputs/macho-universal-archive-bad2.x86_64.i386 2>&1 | FileCheck --check-prefix=INCOMPLETE-SEGMENT-LOADC-FAT-ARCHIVE %s
99 INCOMPLETE-SEGMENT-LOADC-FAT-ARCHIVE: macho-universal-archive-bad2.x86_64.i386(macho64-invalid-incomplete-segment-load-command) (for architecture x86_64): truncated or malformed object (load commands extend past the end of the file)
101 RUN: not llvm-objdump --macho --universal-headers %p/Inputs/macho-invalid-fat 2>&1 | FileCheck --check-prefix=INVALID-FAT %s
102 INVALID-FAT: truncated or malformed fat file (fat_arch_64 structs would extend past the end of the file)
104 RUN: not llvm-objdump --macho --private-headers --arch=all %p/Inputs/macho-invalid-fat.obj.elf-x86_64 2>&1 | FileCheck --check-prefix=INVALID-FAT-ELF %s
105 INVALID-FAT-ELF: error: '{{.*}}/macho-invalid-fat.obj.elf-x86_64': Mach-O universal file for architecture x86_64 is not a Mach-O file or an archive file
107 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-segment-fileoff 2>&1 | FileCheck --check-prefix=INVALID-SEGMENT-FILEOFF %s
108 INVALID-SEGMENT-FILEOFF: macho-invalid-segment-fileoff': truncated or malformed object (load command 0 fileoff field in LC_SEGMENT extends past the end of the file)
110 RUN: not llvm-nm %p/Inputs/macho-invalid-segment-fileoff 2>&1 | FileCheck -check-prefix INVALID-SEGMENT-FILEOFF-NM %s
111 INVALID-SEGMENT-FILEOFF-NM: macho-invalid-segment-fileoff: truncated or malformed object (load command 0 fileoff field in LC_SEGMENT extends past the end of the file)
113 RUN: not llvm-size %p/Inputs/macho-invalid-segment-fileoff 2>&1 | FileCheck -DFILE=%p/Inputs/macho-invalid-segment-fileoff -check-prefix INVALID-SEGMENT-FILEOFF-SIZE %s
114 INVALID-SEGMENT-FILEOFF-SIZE: error: '[[FILE]]': truncated or malformed object (load command 0 fileoff field in LC_SEGMENT extends past the end of the file)
116 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-segment-filesize 2>&1 | FileCheck --check-prefix=INVALID-SEGMENT-FILESIZE %s
117 INVALID-SEGMENT-FILESIZE: macho-invalid-segment-filesize': truncated or malformed object (load command 0 fileoff field plus filesize field in LC_SEGMENT extends past the end of the file)
119 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-segment-vmsize 2>&1 | FileCheck --check-prefix=INVALID-SEGMENT-VMSIZE %s
120 INVALID-SEGMENT-VMSIZE: macho-invalid-segment-vmsize': truncated or malformed object (load command 0 filesize field in LC_SEGMENT greater than vmsize field)
122 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-section-offset 2>&1 | FileCheck --check-prefix=INVALID-SECTION-FILEOFF %s
123 INVALID-SECTION-FILEOFF: macho-invalid-section-offset': truncated or malformed object (offset field of section 0 in LC_SEGMENT command 0 extends past the end of the file)
125 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-section-offset-in-headers 2>&1 | FileCheck --check-prefix=INVALID-SECTION-FILEOFF-IN-HEADERS %s
126 INVALID-SECTION-FILEOFF-IN-HEADERS: macho-invalid-section-offset-in-headers': truncated or malformed object (offset field of section 0 in LC_SEGMENT command 0 not past the headers of the file)
128 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-section-offset-size 2>&1 | FileCheck --check-prefix=INVALID-SECTION-FILEOFF-SIZE %s
129 INVALID-SECTION-FILEOFF-SIZE: macho-invalid-section-offset-size': truncated or malformed object (offset field plus size field of section 0 in LC_SEGMENT command 0 extends past the end of the file)
131 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-section-size-filesize 2>&1 | FileCheck --check-prefix=INVALID-SECTION-SIZE-FILESIZE %s
132 INVALID-SECTION-SIZE-FILESIZE: macho-invalid-section-size-filesize': truncated or malformed object (size field of section 0 in LC_SEGMENT command 0 greater than the segment)
134 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-section-addr 2>&1 | FileCheck --check-prefix=INVALID-SECTION-ADDR %s
135 INVALID-SECTION-ADDR: macho-invalid-section-addr': truncated or malformed object (addr field of section 0 in LC_SEGMENT command 0 less than the segment's vmaddr)
137 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-section-addr-size 2>&1 | FileCheck --check-prefix=INVALID-SECTION-ADDR-SIZE %s
138 INVALID-SECTION-ADDR-SIZE: macho-invalid-section-addr-size': truncated or malformed object (addr field plus size of section 0 in LC_SEGMENT command 0 greater than than the segment's vmaddr plus vmsize)
140 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-section-reloff 2>&1 | FileCheck --check-prefix=INVALID-SECTION-RELOFF %s
141 INVALID-SECTION-RELOFF: macho-invalid-section-reloff': truncated or malformed object (reloff field of section 0 in LC_SEGMENT command 0 extends past the end of the file)
143 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-section-reloff-nrelocs 2>&1 | FileCheck --check-prefix=INVALID-SECTION-RELOFF-NRELOCS %s
144 INVALID-SECTION-RELOFF-NRELOCS: macho-invalid-section-reloff-nrelocs': truncated or malformed object (reloff field plus nreloc field times sizeof(struct relocation_info) of section 0 in LC_SEGMENT command 0 extends past the end of the file)
146 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-symtab-small 2>&1 | FileCheck --check-prefix=INVALID-SYMTAB-SMALL %s
147 INVALID-SYMTAB-SMALL: macho-invalid-symtab-small': truncated or malformed object (load command 0 LC_SYMTAB cmdsize too small)
149 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-symtab-more-than-one 2>&1 | FileCheck --check-prefix=INVALID-SYMTAB-MORE-THAN-ONE %s
150 INVALID-SYMTAB-MORE-THAN-ONE: macho-invalid-symtab-more-than-one': truncated or malformed object (more than one LC_SYMTAB command)
152 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-symtab-bad-size 2>&1 | FileCheck --check-prefix=INVALID-SYMTAB-BAD-SIZE %s
153 INVALID-SYMTAB-BAD-SIZE: macho-invalid-symtab-bad-size': truncated or malformed object (LC_SYMTAB command 0 has incorrect cmdsize)
155 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-symtab-symoff 2>&1 | FileCheck --check-prefix=INVALID-SYMTAB-SYMOFF %s
156 INVALID-SYMTAB-SYMOFF: macho-invalid-symtab-symoff': truncated or malformed object (symoff field of LC_SYMTAB command 0 extends past the end of the file)
158 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-symtab-symoff-nsyms 2>&1 | FileCheck --check-prefix=INVALID-SYMTAB-SYMOFF-NSYMS %s
159 INVALID-SYMTAB-SYMOFF-NSYMS: macho-invalid-symtab-symoff-nsyms': truncated or malformed object (symoff field plus nsyms field times sizeof(struct nlist) of LC_SYMTAB command 0 extends past the end of the file)
161 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-symtab-stroff 2>&1 | FileCheck --check-prefix=INVALID-SYMTAB-STROFF %s
162 INVALID-SYMTAB-STROFF: macho-invalid-symtab-stroff': truncated or malformed object (stroff field of LC_SYMTAB command 0 extends past the end of the file)
164 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-symtab-stroff-strsize 2>&1 | FileCheck --check-prefix=INVALID-SYMTAB-STROFF-STRSIZE %s
165 INVALID-SYMTAB-STROFF-STRSIZE: macho-invalid-symtab-stroff-strsize': truncated or malformed object (stroff field plus strsize field of LC_SYMTAB command 0 extends past the end of the file)
167 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-small 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-SMALL %s
168 INVALID-DYSYMTAB-SMALL: macho-invalid-dysymtab-small': truncated or malformed object (load command 0 LC_DYSYMTAB cmdsize too small)
170 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-more-than-one 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-MORE-THAN-ONE %s
171 INVALID-DYSYMTAB-MORE-THAN-ONE: macho-invalid-dysymtab-more-than-one': truncated or malformed object (more than one LC_DYSYMTAB command)
173 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-bad-size 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-BAD-SIZE %s
174 INVALID-DYSYMTAB-BAD-SIZE: macho-invalid-dysymtab-bad-size': truncated or malformed object (LC_DYSYMTAB command 0 has incorrect cmdsize)
176 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-tocoff 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-TOCOFF %s
177 INVALID-DYSYMTAB-TOCOFF: macho-invalid-dysymtab-tocoff': truncated or malformed object (tocoff field of LC_DYSYMTAB command 0 extends past the end of the file)
179 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-tocoff-ntoc 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-TOCOFF-NTOC %s
180 INVALID-DYSYMTAB-TOCOFF-NTOC: macho-invalid-dysymtab-tocoff-ntoc': truncated or malformed object (tocoff field plus ntoc field times sizeof(struct dylib_table_of_contents) of LC_DYSYMTAB command 0 extends past the end of the file)
182 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-modtaboff 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-TOCOFF-MODTABOFF %s
183 INVALID-DYSYMTAB-TOCOFF-MODTABOFF: macho-invalid-dysymtab-modtaboff': truncated or malformed object (modtaboff field of LC_DYSYMTAB command 0 extends past the end of the file)
185 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-modtaboff-nmodtab 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-TOCOFF-MODTABOFF-NMODTAB %s
186 INVALID-DYSYMTAB-TOCOFF-MODTABOFF-NMODTAB: macho-invalid-dysymtab-modtaboff-nmodtab': truncated or malformed object (modtaboff field plus nmodtab field times sizeof(struct dylib_module) of LC_DYSYMTAB command 0 extends past the end of the file)
188 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-extrefsymoff 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-TOCOFF-EXTREFSYMOFF %s
189 INVALID-DYSYMTAB-TOCOFF-EXTREFSYMOFF: macho-invalid-dysymtab-extrefsymoff': truncated or malformed object (extrefsymoff field of LC_DYSYMTAB command 0 extends past the end of the file)
191 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-extrefsymoff-nextrefsyms 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-TOCOFF-EXTREFSYMOFF-NEXTREFSYMS %s
192 INVALID-DYSYMTAB-TOCOFF-EXTREFSYMOFF-NEXTREFSYMS: macho-invalid-dysymtab-extrefsymoff-nextrefsyms': truncated or malformed object (extrefsymoff field plus nextrefsyms field times sizeof(struct dylib_reference) of LC_DYSYMTAB command 0 extends past the end of the file)
194 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-indirectsymoff 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-TOCOFF-INDIRECTSYMOFF %s
195 INVALID-DYSYMTAB-TOCOFF-INDIRECTSYMOFF: macho-invalid-dysymtab-indirectsymoff': truncated or malformed object (indirectsymoff field of LC_DYSYMTAB command 0 extends past the end of the file)
197 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-indirectsymoff-nindirectsyms 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-TOCOFF-INDIRECTSYMOFF-NINDIRECTSYMS %s
198 INVALID-DYSYMTAB-TOCOFF-INDIRECTSYMOFF-NINDIRECTSYMS: macho-invalid-dysymtab-indirectsymoff-nindirectsyms': truncated or malformed object (indirectsymoff field plus nindirectsyms field times sizeof(uint32_t) of LC_DYSYMTAB command 0 extends past the end of the file)
200 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-extreloff 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-TOCOFF-EXTRELOFF %s
201 INVALID-DYSYMTAB-TOCOFF-EXTRELOFF: macho-invalid-dysymtab-extreloff': truncated or malformed object (extreloff field of LC_DYSYMTAB command 0 extends past the end of the file)
203 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-extreloff-nextrel 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-TOCOFF-EXTRELOFF-NEXTREL %s
204 INVALID-DYSYMTAB-TOCOFF-EXTRELOFF-NEXTREL: macho-invalid-dysymtab-extreloff-nextrel': truncated or malformed object (extreloff field plus nextrel field times sizeof(struct relocation_info) of LC_DYSYMTAB command 0 extends past the end of the file)
206 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-locreloff 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-TOCOFF-LOCRELOFF %s
207 INVALID-DYSYMTAB-TOCOFF-LOCRELOFF: macho-invalid-dysymtab-locreloff': truncated or malformed object (locreloff field of LC_DYSYMTAB command 0 extends past the end of the file)
209 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dysymtab-locreloff-nlocrel 2>&1 | FileCheck --check-prefix=INVALID-DYSYMTAB-TOCOFF-LOCRELOFF-NLOCREL %s
210 INVALID-DYSYMTAB-TOCOFF-LOCRELOFF-NLOCREL: macho-invalid-dysymtab-locreloff-nlocrel': truncated or malformed object (locreloff field plus nlocrel field times sizeof(struct relocation_info) of LC_DYSYMTAB command 0 extends past the end of the file)
212 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dataincode-more-than-one 2>&1 | FileCheck --check-prefix=INVALID-DATAINCODE-MORE-THAN-ONE %s
213 INVALID-DATAINCODE-MORE-THAN-ONE: macho-invalid-dataincode-more-than-one': truncated or malformed object (more than one LC_DATA_IN_CODE command)
215 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-linkopthint-small 2>&1 | FileCheck --check-prefix=INVALID-LINKOPTHINT-SMALL %s
216 INVALID-LINKOPTHINT-SMALL: macho-invalid-linkopthint-small': truncated or malformed object (load command 0 LC_LINKER_OPTIMIZATION_HINT cmdsize too small)
218 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dataincode-bad-size 2>&1 | FileCheck --check-prefix=INVALID-DATAINCODE-BAD-SIZE %s
219 INVALID-DATAINCODE-BAD-SIZE: macho-invalid-dataincode-bad-size': truncated or malformed object (LC_DATA_IN_CODE command 0 has incorrect cmdsize)
221 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-linkopthint-dataoff 2>&1 | FileCheck --check-prefix=INVALID-LINKOPTHINT-DATAOFF %s
222 INVALID-LINKOPTHINT-DATAOFF: macho-invalid-linkopthint-dataoff': truncated or malformed object (dataoff field of LC_LINKER_OPTIMIZATION_HINT command 0 extends past the end of the file)
224 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dataincode-dataoff-datasize 2>&1 | FileCheck --check-prefix=INVALID-DATAINCODE-DATAOFF-DATASIZE %s
225 INVALID-DATAINCODE-DATAOFF-DATASIZE: macho-invalid-dataincode-dataoff-datasize': truncated or malformed object (dataoff field plus datasize field of LC_DATA_IN_CODE command 0 extends past the end of the file)
227 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyldinfo-small 2>&1 | FileCheck --check-prefix=INVALID-DYLDINFO-SMALL %s
228 INVALID-DYLDINFO-SMALL: macho-invalid-dyldinfo-small': truncated or malformed object (load command 0 LC_DYLD_INFO cmdsize too small)
230 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyldinfoonly-bad-size 2>&1 | FileCheck --check-prefix=INVALID-DYLDINFOONLY-BAD-SIZE %s
231 INVALID-DYLDINFOONLY-BAD-SIZE: macho-invalid-dyldinfoonly-bad-size': truncated or malformed object (LC_DYLD_INFO_ONLY command 0 has incorrect cmdsize)
233 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyldinfo-rebase_off 2>&1 | FileCheck --check-prefix=INVALID-DYLDINFO-REBASE_OFF %s
234 INVALID-DYLDINFO-REBASE_OFF: macho-invalid-dyldinfo-rebase_off': truncated or malformed object (rebase_off field of LC_DYLD_INFO command 0 extends past the end of the file)
236 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyldinfo-rebase_off-rebase_size 2>&1 | FileCheck --check-prefix=INVALID-DYLDINFO-REBASE_OFF-REBASE_SIZE %s
237 INVALID-DYLDINFO-REBASE_OFF-REBASE_SIZE: macho-invalid-dyldinfo-rebase_off-rebase_size': truncated or malformed object (rebase_off field plus rebase_size field of LC_DYLD_INFO command 0 extends past the end of the file)
239 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyldinfoonly-bind_off 2>&1 | FileCheck --check-prefix=INVALID-DYLDINFOONLY-BIND_OFF %s
240 INVALID-DYLDINFOONLY-BIND_OFF: macho-invalid-dyldinfoonly-bind_off': truncated or malformed object (bind_off field of LC_DYLD_INFO_ONLY command 0 extends past the end of the file)
242 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyldinfo-bind_off-bind_size 2>&1 | FileCheck --check-prefix=INVALID-DYLDINFO-BIND_OFF-BIND_SIZE %s
243 INVALID-DYLDINFO-BIND_OFF-BIND_SIZE: macho-invalid-dyldinfo-bind_off-bind_size': truncated or malformed object (bind_off field plus bind_size field of LC_DYLD_INFO command 0 extends past the end of the file)
245 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyldinfoonly-weak_bind_off 2>&1 | FileCheck --check-prefix=INVALID-DYLDINFOONLY-WEAK_BIND_OFF %s
246 INVALID-DYLDINFOONLY-WEAK_BIND_OFF: macho-invalid-dyldinfoonly-weak_bind_off': truncated or malformed object (weak_bind_off field of LC_DYLD_INFO_ONLY command 0 extends past the end of the file)
248 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyldinfo-weak_bind_off-weak_bind_size 2>&1 | FileCheck --check-prefix=INVALID-DYLDINFO-WEAK_BIND_OFF-WEAK_BIND_SIZE %s
249 INVALID-DYLDINFO-WEAK_BIND_OFF-WEAK_BIND_SIZE: macho-invalid-dyldinfo-weak_bind_off-weak_bind_size': truncated or malformed object (weak_bind_off field plus weak_bind_size field of LC_DYLD_INFO command 0 extends past the end of the file)
251 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyldinfoonly-lazy_bind_off 2>&1 | FileCheck --check-prefix=INVALID-DYLDINFOONLY-LAZY_BIND_OFF %s
252 INVALID-DYLDINFOONLY-LAZY_BIND_OFF: macho-invalid-dyldinfoonly-lazy_bind_off': truncated or malformed object (lazy_bind_off field of LC_DYLD_INFO_ONLY command 0 extends past the end of the file)
254 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyldinfo-lazy_bind_off-lazy_bind_size 2>&1 | FileCheck --check-prefix=INVALID-DYLDINFO-LAZY_BIND_OFF-LAZY_BIND_SIZE %s
255 INVALID-DYLDINFO-LAZY_BIND_OFF-LAZY_BIND_SIZE: macho-invalid-dyldinfo-lazy_bind_off-lazy_bind_size': truncated or malformed object (lazy_bind_off field plus lazy_bind_size field of LC_DYLD_INFO command 0 extends past the end of the file)
257 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyldinfoonly-export_off 2>&1 | FileCheck --check-prefix=INVALID-DYLDINFOONLY-EXPORT_OFF %s
258 INVALID-DYLDINFOONLY-EXPORT_OFF: macho-invalid-dyldinfoonly-export_off': truncated or malformed object (export_off field of LC_DYLD_INFO_ONLY command 0 extends past the end of the file)
260 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyldinfo-export_off-export_size 2>&1 | FileCheck --check-prefix=INVALID-DYLDINFO-EXPORT_OFF-EXPORT_SIZE %s
261 INVALID-DYLDINFO-EXPORT_OFF-EXPORT_SIZE: macho-invalid-dyldinfo-export_off-export_size': truncated or malformed object (export_off field plus export_size field of LC_DYLD_INFO command 0 extends past the end of the file)
263 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyldinfo-more-than-one 2>&1 | FileCheck --check-prefix=INVALID-DYLDINFO-MORE-THAN-ONE %s
264 INVALID-DYLDINFO-MORE-THAN-ONE: macho-invalid-dyldinfo-more-than-one': truncated or malformed object (more than one LC_DYLD_INFO and or LC_DYLD_INFO_ONLY command)
266 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dylib-small 2>&1 | FileCheck --check-prefix=INVALID-DYLIB-SMALL %s
267 INVALID-DYLIB-SMALL: macho-invalid-dylib-small': truncated or malformed object (load command 0 LC_LOAD_DYLIB cmdsize too small)
269 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dylib-name_offset-toobig 2>&1 | FileCheck --check-prefix=INVALID-DYLIB-NAME_OFFSET-TOOBIG %s
270 INVALID-DYLIB-NAME_OFFSET-TOOBIG: macho-invalid-dylib-name_offset-toobig': truncated or malformed object (load command 0 LC_LOAD_WEAK_DYLIB name.offset field extends past the end of the load command)
272 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dylib-name_toobig 2>&1 | FileCheck --check-prefix=INVALID-DYLIB-NAME_TOOBIG %s
273 INVALID-DYLIB-NAME_TOOBIG: macho-invalid-dylib-name_toobig': truncated or malformed object (load command 0 LC_LAZY_LOAD_DYLIB library name extends past the end of the load command)
275 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dylib-name_offset-toosmall 2>&1 | FileCheck --check-prefix=INVALID-DYLIB-NAME_OFFSET-TOOSMALL %s
276 INVALID-DYLIB-NAME_OFFSET-TOOSMALL: macho-invalid-dylib-name_offset-toosmall': truncated or malformed object (load command 0 LC_LOAD_UPWARD_DYLIB name.offset field too small, not past the end of the dylib_command struct)
278 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dylib-id-more-than-one 2>&1 | FileCheck --check-prefix=INVALID-DYLIB-ID-MORE-THAN-ONE %s
279 INVALID-DYLIB-ID-MORE-THAN-ONE: macho-invalid-dylib-id-more-than-one': truncated or malformed object (more than one LC_ID_DYLIB command)
281 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dylib-wrong-filetype 2>&1 | FileCheck --check-prefix=INVALID-DYLIB-WRONG-FILETYPE %s
282 INVALID-DYLIB-WRONG-FILETYPE: macho-invalid-dylib-wrong-filetype': truncated or malformed object (LC_ID_DYLIB load command in non-dynamic library file type)
284 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dylib-no-id 2>&1 | FileCheck --check-prefix=INVALID-DYLIB-NO-ID %s
285 INVALID-DYLIB-NO-ID: macho-invalid-dylib-no-id': truncated or malformed object (no LC_ID_DYLIB load command in dynamic library filetype)
287 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dylib-cmdsize-past-eof 2>&1 | FileCheck --check-prefix=INVALID-DYLIB-CMDSIZE %s
288 INVALID-DYLIB-CMDSIZE: macho-invalid-dylib-cmdsize-past-eof': truncated or malformed object (load command 0 extends past end of file)
290 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-uuid-more-than-one 2>&1 | FileCheck --check-prefix=INVALID-UUID-MORE-THAN-ONE %s
291 INVALID-UUID-MORE-THAN-ONE: macho-invalid-uuid-more-than-one': truncated or malformed object (more than one LC_UUID command)
293 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-uuid-bad-size 2>&1 | FileCheck --check-prefix=INVALID-UUID-BAD-SIZE %s
294 INVALID-UUID-BAD-SIZE: macho-invalid-uuid-bad-size': truncated or malformed object (LC_UUID command 0 has incorrect cmdsize)
296 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-function_starts-dataoff 2>&1 | FileCheck --check-prefix=INVALID-FUNCTION_STARTS-DATAOFF %s
297 INVALID-FUNCTION_STARTS-DATAOFF: macho-invalid-function_starts-dataoff': truncated or malformed object (dataoff field of LC_FUNCTION_STARTS command 0 extends past the end of the file)
299 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-splitinfo-dataoff-datasize 2>&1 | FileCheck --check-prefix=INVALID-SPLITINFO-DATAOFF-DATASIZE %s
300 INVALID-SPLITINFO-DATAOFF-DATASIZE: macho-invalid-splitinfo-dataoff-datasize': truncated or malformed object (dataoff field plus datasize field of LC_SEGMENT_SPLIT_INFO command 0 extends past the end of the file)
302 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dylib_code_sign_drs-bad-size 2>&1 | FileCheck --check-prefix=INVALID-DYLIB_CODE_SIGN_DRS-BAD-SIZE %s
303 INVALID-DYLIB_CODE_SIGN_DRS-BAD-SIZE: macho-invalid-dylib_code_sign_drs-bad-size': truncated or malformed object (LC_DYLIB_CODE_SIGN_DRS command 0 has incorrect cmdsize)
305 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyld-small 2>&1 | FileCheck --check-prefix=INVALID-DYLD-SMALL %s
306 INVALID-DYLD-SMALL: macho-invalid-dyld-small': truncated or malformed object (load command 0 LC_ID_DYLINKER cmdsize too small)
308 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyld-name_offset-toobig 2>&1 | FileCheck --check-prefix=INVALID-DYLD-NAME_OFFSET-TOOBIG %s
309 INVALID-DYLD-NAME_OFFSET-TOOBIG: macho-invalid-dyld-name_offset-toobig': truncated or malformed object (load command 0 LC_LOAD_DYLINKER name.offset field extends past the end of the load command)
311 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-dyld-name_toobig 2>&1 | FileCheck --check-prefix=INVALID-DYLD-NAME_TOOBIG %s
312 INVALID-DYLD-NAME_TOOBIG: macho-invalid-dyld-name_toobig': truncated or malformed object (load command 0 LC_DYLD_ENVIRONMENT dyld name extends past the end of the load command)
314 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-vers-small 2>&1 | FileCheck --check-prefix=INVALID-VERS-SMALL %s
315 INVALID-VERS-SMALL: macho-invalid-vers-small': truncated or malformed object (load command 0 LC_VERSION_MIN_MACOSX has incorrect cmdsize)
317 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-vers-more-than-one 2>&1 | FileCheck --check-prefix=INVALID-VERS-MORE-THAN-ONE %s
318 INVALID-VERS-MORE-THAN-ONE: macho-invalid-vers-more-than-one': truncated or malformed object (more than one LC_VERSION_MIN_MACOSX, LC_VERSION_MIN_IPHONEOS, LC_VERSION_MIN_TVOS or LC_VERSION_MIN_WATCHOS command)
320 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-rpath-small 2>&1 | FileCheck --check-prefix=INVALID-RPATH-SMALL %s
321 INVALID-RPATH-SMALL: macho-invalid-rpath-small': truncated or malformed object (load command 0 LC_RPATH cmdsize too small)
323 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-rpath-name_offset-toobig 2>&1 | FileCheck --check-prefix=INVALID-RPATH-NAME_OFFSET-TOOBIG %s
324 INVALID-RPATH-NAME_OFFSET-TOOBIG: macho-invalid-rpath-name_offset-toobig': truncated or malformed object (load command 0 LC_RPATH path.offset field extends past the end of the load command)
326 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-rpath-name_toobig 2>&1 | FileCheck --check-prefix=INVALID-RPATH-NAME_TOOBIG %s
327 INVALID-RPATH-NAME_TOOBIG: macho-invalid-rpath-name_toobig': truncated or malformed object (load command 0 LC_RPATH library name extends past the end of the load command)
329 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-source-bad-size 2>&1 | FileCheck --check-prefix=INVALID-SOURCE-BAD-SIZE %s
330 INVALID-SOURCE-BAD-SIZE: macho-invalid-source-bad-size': truncated or malformed object (LC_SOURCE_VERSION command 0 has incorrect cmdsize)
332 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-source-more-than-one 2>&1 | FileCheck --check-prefix=INVALID-SOURCE-MORE-THAN-ONE %s
333 INVALID-SOURCE-MORE-THAN-ONE: macho-invalid-source-more-than-one': truncated or malformed object (more than one LC_SOURCE_VERSION command)
335 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-entry-bad-size 2>&1 | FileCheck --check-prefix=INVALID-ENTRY-BAD-SIZE %s
336 INVALID-ENTRY-BAD-SIZE: macho-invalid-entry-bad-size': truncated or malformed object (LC_MAIN command 0 has incorrect cmdsize)
338 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-entry-more-than-one 2>&1 | FileCheck --check-prefix=INVALID-ENTRY-MORE-THAN-ONE %s
339 INVALID-ENTRY-MORE-THAN-ONE: macho-invalid-entry-more-than-one': truncated or malformed object (more than one LC_MAIN command)
341 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-encrypt-bad-size 2>&1 | FileCheck --check-prefix=INVALID-ENCRYPT-BAD-SIZE %s
342 INVALID-ENCRYPT-BAD-SIZE: macho-invalid-encrypt-bad-size': truncated or malformed object (LC_ENCRYPTION_INFO command 0 has incorrect cmdsize)
344 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-encrypt64-bad-size 2>&1 | FileCheck --check-prefix=INVALID-ENCRYPT64-BAD-SIZE %s
345 INVALID-ENCRYPT64-BAD-SIZE: macho-invalid-encrypt64-bad-size': truncated or malformed object (LC_ENCRYPTION_INFO_64 command 0 has incorrect cmdsize)
347 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-encrypt-more-than-one 2>&1 | FileCheck --check-prefix=INVALID-ENCRYPT-MORE-THAN-ONE %s
348 INVALID-ENCRYPT-MORE-THAN-ONE: macho-invalid-encrypt-more-than-one': truncated or malformed object (more than one LC_ENCRYPTION_INFO and or LC_ENCRYPTION_INFO_64 command)
350 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-encrypt-cryptoff 2>&1 | FileCheck --check-prefix=INVALID-ENCRYPT-CRYPTOFF %s
351 INVALID-ENCRYPT-CRYPTOFF: macho-invalid-encrypt-cryptoff': truncated or malformed object (cryptoff field of LC_ENCRYPTION_INFO command 0 extends past the end of the file)
353 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-encrypt64-cryptoff-cryptsize 2>&1 | FileCheck --check-prefix=INVALID-ENCRYPT-CRYPTOFF-CRYPTSIZE %s
354 INVALID-ENCRYPT-CRYPTOFF-CRYPTSIZE: macho-invalid-encrypt64-cryptoff-cryptsize': truncated or malformed object (cryptoff field plus cryptsize field of LC_ENCRYPTION_INFO_64 command 0 extends past the end of the file)
356 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-linkopt-bad-size 2>&1 | FileCheck --check-prefix=INVALID-LINKOPT-BAD-SIZE %s
357 INVALID-LINKOPT-BAD-SIZE: macho-invalid-linkopt-bad-size': truncated or malformed object (load command 0 LC_LINKER_OPTION cmdsize too small)
359 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-linkopt-bad-count 2>&1 | FileCheck --check-prefix=INVALID-LINKOPT-BAD-COUNT %s
360 INVALID-LINKOPT-BAD-COUNT: macho-invalid-linkopt-bad-count': truncated or malformed object (load command 0 LC_LINKER_OPTION string count 3 does not match number of strings)
362 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-subframe-small 2>&1 | FileCheck --check-prefix=INVALID-SUBFRAME-SMALL %s
363 INVALID-SUBFRAME-SMALL: macho-invalid-subframe-small': truncated or malformed object (load command 0 LC_SUB_FRAMEWORK cmdsize too small)
365 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-subumbrella-offset-small 2>&1 | FileCheck --check-prefix=INVALID-SUBUMBRELLA-OFFSET-SMALL %s
366 INVALID-SUBUMBRELLA-OFFSET-SMALL: macho-invalid-subumbrella-offset-small': truncated or malformed object (load command 0 LC_SUB_UMBRELLA sub_umbrella.offset field too small, not past the end of the sub_umbrella_command)
368 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-sublibrary-name_offset-toobig 2>&1 | FileCheck --check-prefix=INVALID-SUBLIB-NAME_OFFSET-TOOBIG %s
369 INVALID-SUBLIB-NAME_OFFSET-TOOBIG: macho-invalid-sublibrary-name_offset-toobig': truncated or malformed object (load command 0 LC_SUB_LIBRARY sub_library.offset field extends past the end of the load command)
371 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-subclient-name_toobig 2>&1 | FileCheck --check-prefix=INVALID-SUBCLIENT-NAME-TOOBIG %s
372 INVALID-SUBCLIENT-NAME-TOOBIG: macho-invalid-subclient-name_toobig': truncated or malformed object (load command 0 LC_SUB_CLIENT client name extends past the end of the load command)
374 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-routines-bad-size 2>&1 | FileCheck --check-prefix=INVALID-ROUTINES-BAD-SIZE %s
375 INVALID-ROUTINES-BAD-SIZE: macho-invalid-routines-bad-size': truncated or malformed object (LC_ROUTINES command 0 has incorrect cmdsize)
377 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-routines64-more-than-one 2>&1 | FileCheck --check-prefix=INVALID-ROUTINES64-MORE-THAN-ONE %s
378 INVALID-ROUTINES64-MORE-THAN-ONE: macho-invalid-routines64-more-than-one': truncated or malformed object (more than one LC_ROUTINES_64 and or LC_ROUTINES command)
380 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-codesign-bad-size 2>&1 | FileCheck --check-prefix=INVALID-CODESIGN-BAD-SIZE %s
381 INVALID-CODESIGN-BAD-SIZE: macho-invalid-codesign-bad-size': truncated or malformed object (LC_CODE_SIGNATURE command 0 has incorrect cmdsize)
383 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-thread-count-pastend 2>&1 | FileCheck --check-prefix=INVALID-THREAD-COUNT-PASTEND %s
384 INVALID-THREAD-COUNT-PASTEND: macho-invalid-thread-count-pastend': truncated or malformed object (load command 0 count in LC_UNIXTHREAD extends past end of command)
386 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-thread-count-wrong 2>&1 | FileCheck --check-prefix=INVALID-THREAD-COUNT-WRONG %s
387 INVALID-THREAD-COUNT-WRONG: macho-invalid-thread-count-wrong': truncated or malformed object (load command 0 count not x86_THREAD_STATE64_COUNT for flavor number 0 which is a x86_THREAD_STATE64 flavor in LC_THREAD command)
389 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-thread-flavor-unknown 2>&1 | FileCheck --check-prefix=INVALID-THREAD-FLAVOR-UNKNOWN %s
390 INVALID-THREAD-FLAVOR-UNKNOWN: macho-invalid-thread-flavor-unknown': truncated or malformed object (load command 0 unknown flavor (507) for flavor number 0 in LC_THREAD command)
392 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-thread-state-pastend 2>&1 | FileCheck --check-prefix=INVALID-THREAD-PASTEND %s
393 INVALID-THREAD-PASTEND: macho-invalid-thread-state-pastend': truncated or malformed object (load command 0 x86_THREAD_STATE64 extends past end of command in LC_THREAD command)
395 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-thread-unknown-cputype 2>&1 | FileCheck --check-prefix=INVALID-THREAD-UNKNOWN-CPUTYPE %s
396 INVALID-THREAD-UNKNOWN-CPUTYPE: macho-invalid-thread-unknown-cputype': truncated or malformed object (unknown cputype (328) load command 0 for LC_THREAD command can't be checked)
398 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-unixthread-more-than-one 2>&1 | FileCheck --check-prefix=INVALID-UNIXTHREAD-MORE-THAN-ONE %s
399 INVALID-UNIXTHREAD-MORE-THAN-ONE: macho-invalid-unixthread-more-than-one': truncated or malformed object (more than one LC_UNIXTHREAD command)
401 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-twolevelhints-bad-size 2>&1 | FileCheck --check-prefix=INVALID-TWOLEVELHINTS-BAD-SIZE %s
402 INVALID-TWOLEVELHINTS-BAD-SIZE: macho-invalid-twolevelhints-bad-size': truncated or malformed object (load command 0 LC_TWOLEVEL_HINTS has incorrect cmdsize)
404 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-twolevelhints-more-than-one 2>&1 | FileCheck --check-prefix=INVALID-TWOLEVELHINTS-MORE-THAN-ONE %s
405 INVALID-TWOLEVELHINTS-MORE-THAN-ONE: macho-invalid-twolevelhints-more-than-one': truncated or malformed object (more than one LC_TWOLEVEL_HINTS command)
407 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-twolevelhints-offset 2>&1 | FileCheck --check-prefix=INVALID-TWOLEVELHINTS-OFFSET %s
408 INVALID-TWOLEVELHINTS-OFFSET: macho-invalid-twolevelhints-offset': truncated or malformed object (offset field of LC_TWOLEVEL_HINTS command 0 extends past the end of the file)
410 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-twolevelhints-offset-nhints 2>&1 | FileCheck --check-prefix=INVALID-TWOLEVELHINTS-OFFSET-HNINTS %s
411 INVALID-TWOLEVELHINTS-OFFSET-HNINTS: macho-invalid-twolevelhints-offset-nhints': truncated or malformed object (offset field plus nhints times sizeof(struct twolevel_hint) field of LC_TWOLEVEL_HINTS command 0 extends past the end of the file)
413 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-fat_cputype 2>&1 | FileCheck --check-prefix=INVALID-FAT-CPUTYPE %s
414 INVALID-FAT-CPUTYPE: macho-invalid-fat_cputype': truncated or malformed object (universal header architecture: 0's cputype does not match object file's mach header)
416 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-prebind_cksum-obsolete 2>&1 | FileCheck --check-prefix=INVALID-PREBIND_CKSUM-OBSOLETE %s
417 INVALID-PREBIND_CKSUM-OBSOLETE: macho-invalid-prebind_cksum-obsolete': truncated or malformed object (load command 0 for cmd value of: 23 is obsolete and not supported)
419 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-symseg-obsolete 2>&1 | FileCheck --check-prefix=INVALID-SYMSEG-OBSOLETE %s
420 INVALID-SYMSEG-OBSOLETE: macho-invalid-symseg-obsolete': truncated or malformed object (load command 0 for cmd value of: 3 is obsolete and not supported)
422 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-idfvmlib-obsolete 2>&1 | FileCheck --check-prefix=INVALID-IDFVMLIB-OBSOLETE %s
423 INVALID-IDFVMLIB-OBSOLETE: macho-invalid-idfvmlib-obsolete': truncated or malformed object (load command 0 for cmd value of: 7 is obsolete and not supported)
425 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-loadfvmlib-obsolete 2>&1 | FileCheck --check-prefix=INVALID-LOADFVMLIB-OBSOLETE %s
426 INVALID-LOADFVMLIB-OBSOLETE: macho-invalid-loadfvmlib-obsolete': truncated or malformed object (load command 0 for cmd value of: 6 is obsolete and not supported)
428 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-prebound_dylib-obsolete 2>&1 | FileCheck --check-prefix=INVALID-PREBOUND_DYLIB-OBSOLETE %s
429 INVALID-PREBOUND_DYLIB-OBSOLETE: macho-invalid-prebound_dylib-obsolete': truncated or malformed object (load command 0 for cmd value of: 16 is obsolete and not supported)
431 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-fvmfile-obsolete 2>&1 | FileCheck --check-prefix=INVALID-FVMFILE-OBSOLETE %s
432 INVALID-FVMFILE-OBSOLETE: macho-invalid-fvmfile-obsolete': truncated or malformed object (load command 0 for cmd value of: 9 is obsolete and not supported)
434 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-prepage-obsolete 2>&1 | FileCheck --check-prefix=INVALID-PREPAGE-OBSOLETE %s
435 INVALID-PREPAGE-OBSOLETE: macho-invalid-prepage-obsolete': truncated or malformed object (load command 0 for cmd value of: 10 is obsolete and not supported)
437 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-symtab-overlap 2>&1 | FileCheck --check-prefix=INVALID-SYMTAB-OVERLAP %s
438 INVALID-SYMTAB-OVERLAP: macho-invalid-symtab-overlap': truncated or malformed object (symbol table at offset 8 with a size of 12, overlaps Mach-O headers at offset 0 with a size of 52)
440 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-strtab-overlap 2>&1 | FileCheck --check-prefix=INVALID-STRTAB-OVERLAP %s
441 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)
443 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-section-overlap 2>&1 | FileCheck --check-prefix=INVALID-SECTION-OVERLAP %s
444 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)
446 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-reloc-overlap 2>&1 | FileCheck --check-prefix=INVALID-RELOC-OVERLAP %s
447 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)
449 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-toc-overlap 2>&1 | FileCheck --check-prefix=INVALID-TOC-OVERLAP %s
450 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)
452 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-modtab-overlap 2>&1 | FileCheck --check-prefix=INVALID-MODTAB-OVERLAP %s
453 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)
455 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-extrefsyms-overlap 2>&1 | FileCheck --check-prefix=INVALID-EXTREFSYMS-OVERLAP %s
456 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)
458 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-indirectsyms-overlap 2>&1 | FileCheck --check-prefix=INVALID-INDIRECTSYMS-OVERLAP %s
459 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)
461 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-extreloff-overlap 2>&1 | FileCheck --check-prefix=INVALID-EXTRELOFF-OVERLAP %s
462 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)
464 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-locreloff-overlap 2>&1 | FileCheck --check-prefix=INVALID-LOCRELOFF-OVERLAP %s
465 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)
467 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-hints-overlap 2>&1 | FileCheck --check-prefix=INVALID-HINTS-OVERLAP %s
468 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)
470 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-codesig-overlap 2>&1 | FileCheck --check-prefix=INVALID-CODESIG-OVERLAP %s
471 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)
473 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-rebase-overlap 2>&1 | FileCheck --check-prefix=INVALID-REBASE-OVERLAP %s
474 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)
476 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-bind-overlap 2>&1 | FileCheck --check-prefix=INVALID-BIND-OVERLAP %s
477 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)
479 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-weak_bind-overlap 2>&1 | FileCheck --check-prefix=INVALID-WEAK_BIND-OVERLAP %s
480 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)
482 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-lazy_bind-overlap 2>&1 | FileCheck --check-prefix=INVALID-LAZY_BIND-OVERLAP %s
483 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)
485 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-export-overlap 2>&1 | FileCheck --check-prefix=INVALID-EXPORT-OVERLAP %s
486 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)
488 RUN: not llvm-objdump --macho --universal-headers %p/Inputs/macho-invalid-fat-header 2>&1 | FileCheck --check-prefix=INVALID-FAT-HEADER %s
489 INVALID-FAT-HEADER: macho-invalid-fat-header': truncated or malformed fat file (contains zero architecture types)
491 RUN: yaml2obj %p/Inputs/macho-invalid-fat-arch-size.yaml -o - | not llvm-objdump --macho --universal-headers - 2>&1 | FileCheck --check-prefix=INVALID-FAT-ARCH-SIZE %s
492 INVALID-FAT-ARCH-SIZE: '-': truncated or malformed fat file (offset plus size of cputype (7) cpusubtype (3) extends past the end of the file)
494 RUN: not llvm-objdump --macho --universal-headers %p/Inputs/macho-invalid-fat-arch-bigalign 2>&1 | FileCheck --check-prefix=INVALID-FAT-ARCH-BIGALIGN %s
495 INVALID-FAT-ARCH-BIGALIGN: macho-invalid-fat-arch-bigalign': truncated or malformed fat file (align (2^212) too large for cputype (7) cpusubtype (3) (maximum 2^15))
497 RUN: not llvm-objdump --macho --universal-headers %p/Inputs/macho-invalid-fat-arch-badalign 2>&1 | FileCheck --check-prefix=INVALID-FAT-ARCH-BADALIGN %s
498 INVALID-FAT-ARCH-BADALIGN: macho-invalid-fat-arch-badalign': truncated or malformed fat file (offset: 28 for cputype (7) cpusubtype (3) not aligned on it's alignment (2^4))
500 RUN: not llvm-objdump --macho --universal-headers %p/Inputs/macho-invalid-fat-arch-twosame 2>&1 | FileCheck --check-prefix=INVALID-FAT-ARCH-TWOSAME %s
501 INVALID-FAT-ARCH-TWOSAME: macho-invalid-fat-arch-twosame': truncated or malformed fat file (contains two of the same architecture (cputype (7) cpusubtype (3)))
503 RUN: not llvm-objdump --macho --universal-headers %p/Inputs/macho-invalid-fat-arch-overlap 2>&1 | FileCheck --check-prefix=INVALID-FAT-ARCH-OVERLAP %s
504 INVALID-FAT-ARCH-OVERLAP: macho-invalid-fat-arch-overlap': truncated or malformed fat file (cputype (7) cpusubtype (5) at offset 48 with a size of 28, overlaps cputype (7) cpusubtype (3) at offset 52 with a size of 28)
506 RUN: not llvm-objdump --macho --universal-headers %p/Inputs/macho-invalid-fat-arch-overlapheaders 2>&1 | FileCheck --check-prefix=INVALID-FAT-ARCH-OVERLAPHEADERS %s
507 INVALID-FAT-ARCH-OVERLAPHEADERS: macho-invalid-fat-arch-overlapheaders': truncated or malformed fat file (cputype (7) cpusubtype (3) offset 12 overlaps universal headers)
509 RUN: not llvm-objdump --macho --private-headers %p/Inputs/macho-invalid-note 2>&1 | FileCheck --check-prefix=INVALID-NOTE-COMMAND %s
510 INVALID-NOTE-COMMAND: macho-invalid-note': truncated or malformed object (size field plus offset field of LC_NOTE command 0 extends past the end of the file)