Filipe Cabecinhas | 4013950 | 2015-01-15 22:52:38 +0000 | [diff] [blame^] | 1 | // No crash, might not be totally invalid |
| 2 | RUN: llvm-objdump -private-headers %p/Inputs/macho-invalid-zero-ncmds |
| 3 | |
| 4 | RUN: not llvm-objdump -private-headers %p/Inputs/macho64-invalid-incomplete-load-command 2>&1 \ |
| 5 | RUN: | FileCheck -check-prefix INCOMPLETE-LOADC %s |
| 6 | |
| 7 | RUN: not llvm-objdump -private-headers %p/Inputs/macho-invalid-too-small-load-command 2>&1 \ |
| 8 | RUN: | FileCheck -check-prefix SMALL-LOADC-SIZE %s |
| 9 | RUN: not llvm-objdump -private-headers %p/Inputs/macho64-invalid-too-small-load-command 2>&1 \ |
| 10 | RUN: | FileCheck -check-prefix SMALL-LOADC-SIZE %s |
| 11 | |
| 12 | RUN: not llvm-objdump -private-headers %p/Inputs/macho-invalid-too-small-segment-load-command 2>&1 \ |
| 13 | RUN: | FileCheck -check-prefix SMALL-SEGLOADC-SIZE %s |
| 14 | RUN: not llvm-objdump -private-headers %p/Inputs/macho64-invalid-too-small-segment-load-command 2>&1 \ |
| 15 | RUN: | FileCheck -check-prefix SMALL-SEGLOADC-SIZE %s |
| 16 | |
| 17 | RUN: not llvm-objdump -private-headers %p/Inputs/macho-invalid-no-size-for-sections 2>&1 \ |
| 18 | RUN: | FileCheck -check-prefix TOO-MANY-SECTS %s |
| 19 | RUN: not llvm-objdump -private-headers %p/Inputs/macho64-invalid-no-size-for-sections 2>&1 \ |
| 20 | RUN: | FileCheck -check-prefix TOO-MANY-SECTS %s |
| 21 | |
| 22 | RUN: not llvm-objdump -t %p/Inputs/macho-invalid-bad-symbol-index 2>&1 \ |
| 23 | RUN: | FileCheck -check-prefix BAD-SYMBOL %s |
| 24 | |
| 25 | RUN: not llvm-objdump -t %p/Inputs/macho-invalid-symbol-name-past-eof 2>&1 \ |
| 26 | RUN: | FileCheck -check-prefix NAME-PAST-EOF %s |
| 27 | |
| 28 | RUN: not llvm-objdump -t %p/Inputs/macho-invalid-section-index-getSectionRawFinalSegmentName 2>&1 \ |
| 29 | RUN: | FileCheck -check-prefix INVALID-SECTION-IDX-SEG-NAME %s |
| 30 | |
| 31 | RUN: not llvm-nm %p/Inputs/macho-invalid-section-index-getSectionRawName 2>&1 \ |
| 32 | RUN: | FileCheck -check-prefix INVALID-SECTION-IDX-SECT-NAME %s |
| 33 | |
| 34 | RUN: not llvm-objdump -t %p/Inputs/macho-invalid-getsection-index 2>&1 \ |
| 35 | RUN: | FileCheck -check-prefix INVALID-SECTION-IDX-GETSECT %s |
| 36 | |
| 37 | RUN: not llvm-objdump -t %p/Inputs/macho64-invalid-getsection-index 2>&1 \ |
| 38 | RUN: | FileCheck -check-prefix INVALID-SECTION-IDX-GETSECT64 %s |
| 39 | |
| 40 | |
| 41 | SMALL-LOADC-SIZE: Load command with size < 8 bytes |
| 42 | SMALL-SEGLOADC-SIZE: Segment load command size is too small |
| 43 | INCOMPLETE-LOADC: Malformed MachO file |
| 44 | TOO-MANY-SECTS: Number of sections too large for size of load command |
| 45 | BAD-SYMBOL: Requested symbol index is out of range |
| 46 | NAME-PAST-EOF: Symbol name entry points past end of file |
| 47 | |
| 48 | INVALID-SECTION-IDX-SEG-NAME: getSectionRawFinalSegmentName: Invalid section index |
| 49 | INVALID-SECTION-IDX-SECT-NAME: getSectionRawName: Invalid section index |
| 50 | INVALID-SECTION-IDX-GETSECT: getSection: Invalid section index |
| 51 | INVALID-SECTION-IDX-GETSECT64: getSection64: Invalid section index |