diff options
| author | Kevin Enderby <enderby@apple.com> | 2016-09-21 20:03:09 +0000 |
|---|---|---|
| committer | Kevin Enderby <enderby@apple.com> | 2016-09-21 20:03:09 +0000 |
| commit | e71e13c7d612c328042682f46144e04d740d271f (patch) | |
| tree | cecf1d4b1d3d4902bcf05e95585f95e29327a97e /llvm/test/Object | |
| parent | 1ac2f2c4d319a0b20c99bc0404a8420bf44b22a9 (diff) | |
| download | bcm5719-llvm-e71e13c7d612c328042682f46144e04d740d271f.tar.gz bcm5719-llvm-e71e13c7d612c328042682f46144e04d740d271f.zip | |
Next set of additional error checks for invalid Mach-O files for bad LC_UUID
load commands. Added a missing check and made the check for more than
one like other other “more than one” checks. And of course added test cases.
llvm-svn: 282104
Diffstat (limited to 'llvm/test/Object')
| -rw-r--r-- | llvm/test/Object/Inputs/macho-invalid-uuid-bad-size | bin | 0 -> 48 bytes | |||
| -rw-r--r-- | llvm/test/Object/Inputs/macho-invalid-uuid-more-than-one | bin | 0 -> 76 bytes | |||
| -rw-r--r-- | llvm/test/Object/macho-invalid.test | 6 |
3 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/Object/Inputs/macho-invalid-uuid-bad-size b/llvm/test/Object/Inputs/macho-invalid-uuid-bad-size Binary files differnew file mode 100644 index 00000000000..6e7351e76b3 --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-uuid-bad-size diff --git a/llvm/test/Object/Inputs/macho-invalid-uuid-more-than-one b/llvm/test/Object/Inputs/macho-invalid-uuid-more-than-one Binary files differnew file mode 100644 index 00000000000..5427811a9a4 --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-uuid-more-than-one diff --git a/llvm/test/Object/macho-invalid.test b/llvm/test/Object/macho-invalid.test index b8a1e10148f..64899d76126 100644 --- a/llvm/test/Object/macho-invalid.test +++ b/llvm/test/Object/macho-invalid.test @@ -283,3 +283,9 @@ INVALID-DYLIB-WRONG-FILETYPE: macho-invalid-dylib-wrong-filetype': truncated or RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-dylib-no-id 2>&1 | FileCheck -check-prefix INVALID-DYLIB-NO-ID %s INVALID-DYLIB-NO-ID: macho-invalid-dylib-no-id': truncated or malformed object (no LC_ID_DYLIB load command in dynamic library filetype) + +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 +INVALID-UUID-MORE-THAN-ONE: macho-invalid-uuid-more-than-one': truncated or malformed object (more than one LC_UUID command) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-uuid-bad-size 2>&1 | FileCheck -check-prefix INVALID-UUID-BAD-SIZE %s +INVALID-UUID-BAD-SIZE: macho-invalid-uuid-bad-size': truncated or malformed object (LC_UUID command 0 has incorrect cmdsize) |

