summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Object/Inputs/macho-invalid-dataincode-bad-sizebin0 -> 48 bytes
-rw-r--r--llvm/test/Object/Inputs/macho-invalid-dataincode-dataoff-datasizebin0 -> 44 bytes
-rw-r--r--llvm/test/Object/Inputs/macho-invalid-dataincode-more-than-onebin0 -> 60 bytes
-rw-r--r--llvm/test/Object/Inputs/macho-invalid-linkopthint-dataoffbin0 -> 44 bytes
-rw-r--r--llvm/test/Object/Inputs/macho-invalid-linkopthint-smallbin0 -> 44 bytes
-rw-r--r--llvm/test/Object/macho-invalid.test16
6 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/Object/Inputs/macho-invalid-dataincode-bad-size b/llvm/test/Object/Inputs/macho-invalid-dataincode-bad-size
new file mode 100644
index 00000000000..c0ea110bc6e
--- /dev/null
+++ b/llvm/test/Object/Inputs/macho-invalid-dataincode-bad-size
Binary files differ
diff --git a/llvm/test/Object/Inputs/macho-invalid-dataincode-dataoff-datasize b/llvm/test/Object/Inputs/macho-invalid-dataincode-dataoff-datasize
new file mode 100644
index 00000000000..fd3ab6dc5dc
--- /dev/null
+++ b/llvm/test/Object/Inputs/macho-invalid-dataincode-dataoff-datasize
Binary files differ
diff --git a/llvm/test/Object/Inputs/macho-invalid-dataincode-more-than-one b/llvm/test/Object/Inputs/macho-invalid-dataincode-more-than-one
new file mode 100644
index 00000000000..383d0ec2a09
--- /dev/null
+++ b/llvm/test/Object/Inputs/macho-invalid-dataincode-more-than-one
Binary files differ
diff --git a/llvm/test/Object/Inputs/macho-invalid-linkopthint-dataoff b/llvm/test/Object/Inputs/macho-invalid-linkopthint-dataoff
new file mode 100644
index 00000000000..1b2b3d84f9a
--- /dev/null
+++ b/llvm/test/Object/Inputs/macho-invalid-linkopthint-dataoff
Binary files differ
diff --git a/llvm/test/Object/Inputs/macho-invalid-linkopthint-small b/llvm/test/Object/Inputs/macho-invalid-linkopthint-small
new file mode 100644
index 00000000000..5fe69198246
--- /dev/null
+++ b/llvm/test/Object/Inputs/macho-invalid-linkopthint-small
Binary files differ
diff --git a/llvm/test/Object/macho-invalid.test b/llvm/test/Object/macho-invalid.test
index 2162a88a52f..91a325ad7d1 100644
--- a/llvm/test/Object/macho-invalid.test
+++ b/llvm/test/Object/macho-invalid.test
@@ -208,3 +208,19 @@ INVALID-DYSYMTAB-TOCOFF-LOCRELOFF: macho-invalid-dysymtab-locreloff': truncated
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
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)
+
+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
+INVALID-DATAINCODE-MORE-THAN-ONE: macho-invalid-dataincode-more-than-one': truncated or malformed object (more than one LC_DATA_IN_CODE command)
+
+RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-linkopthint-small 2>&1 | FileCheck -check-prefix INVALID-LINKOPTHINT-SMALL %s
+INVALID-LINKOPTHINT-SMALL: macho-invalid-linkopthint-small': truncated or malformed object (load command 0 LC_LINKER_OPTIMIZATION_HINT cmdsize too small)
+
+RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-dataincode-bad-size 2>&1 | FileCheck -check-prefix INVALID-DATAINCODE-BAD-SIZE %s
+INVALID-DATAINCODE-BAD-SIZE: macho-invalid-dataincode-bad-size': truncated or malformed object (LC_DATA_IN_CODE command 0 has incorrect cmdsize)
+
+RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-linkopthint-dataoff 2>&1 | FileCheck -check-prefix INVALID-LINKOPTHINT-DATAOFF %s
+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)
+
+RUN: not llvm-objdump -macho -private-headers %p/Inputs/macho-invalid-dataincode-dataoff-datasize 2>&1 | FileCheck -check-prefix INVALID-DATAINCODE-DATAOFF-DATASIZE %s
+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)
+
OpenPOWER on IntegriCloud