diff options
| author | Kevin Enderby <enderby@apple.com> | 2016-09-26 21:11:03 +0000 |
|---|---|---|
| committer | Kevin Enderby <enderby@apple.com> | 2016-09-26 21:11:03 +0000 |
| commit | 90986e6c7c8d81985ad2cfa6d085d7d35ee71242 (patch) | |
| tree | 91d40a374e982f1b49b846f7d74bd88ca7615d87 /llvm/test | |
| parent | 0a48b37cfdb69fdbdc799e2754124338c721e5dc (diff) | |
| download | bcm5719-llvm-90986e6c7c8d81985ad2cfa6d085d7d35ee71242.tar.gz bcm5719-llvm-90986e6c7c8d81985ad2cfa6d085d7d35ee71242.zip | |
Next set of additional error checks for invalid Mach-O files for the
other load commands that use the Mach::linkedit_data_command type
but not used in llvm libObject code but used in llvm tool code.
This includes LC_FUNCTION_STARTS, LC_SEGMENT_SPLIT_INFO
and LC_DYLIB_CODE_SIGN_DRS load commands.
llvm-svn: 282441
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Object/Inputs/macho-invalid-dylib_code_sign_drs-bad-size | bin | 0 -> 48 bytes | |||
| -rw-r--r-- | llvm/test/Object/Inputs/macho-invalid-function_starts-dataoff | bin | 0 -> 44 bytes | |||
| -rw-r--r-- | llvm/test/Object/Inputs/macho-invalid-splitinfo-dataoff-datasize | bin | 0 -> 44 bytes | |||
| -rw-r--r-- | llvm/test/Object/macho-invalid.test | 9 |
4 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Object/Inputs/macho-invalid-dylib_code_sign_drs-bad-size b/llvm/test/Object/Inputs/macho-invalid-dylib_code_sign_drs-bad-size Binary files differnew file mode 100644 index 00000000000..1460dd2c1ae --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-dylib_code_sign_drs-bad-size diff --git a/llvm/test/Object/Inputs/macho-invalid-function_starts-dataoff b/llvm/test/Object/Inputs/macho-invalid-function_starts-dataoff Binary files differnew file mode 100644 index 00000000000..4913a85776c --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-function_starts-dataoff diff --git a/llvm/test/Object/Inputs/macho-invalid-splitinfo-dataoff-datasize b/llvm/test/Object/Inputs/macho-invalid-splitinfo-dataoff-datasize Binary files differnew file mode 100644 index 00000000000..75fefd9c9e6 --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-splitinfo-dataoff-datasize diff --git a/llvm/test/Object/macho-invalid.test b/llvm/test/Object/macho-invalid.test index 64899d76126..b1689b6b12d 100644 --- a/llvm/test/Object/macho-invalid.test +++ b/llvm/test/Object/macho-invalid.test @@ -289,3 +289,12 @@ INVALID-UUID-MORE-THAN-ONE: macho-invalid-uuid-more-than-one': truncated or malf 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) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-function_starts-dataoff 2>&1 | FileCheck -check-prefix INVALID-FUNCTION_STARTS-DATAOFF %s +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) + +RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-splitinfo-dataoff-datasize 2>&1 | FileCheck -check-prefix INVALID-SPLITINFO-DATAOFF-DATASIZE %s +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) + +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 +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) |

