From: Steven Wu Date: Tue, 5 Nov 2019 16:57:34 +0000 (-0800) Subject: [Object][MachO] Rewrite macho-invalid-fat-arch-size into YAML X-Git-Tag: llvmorg-11-init~4984 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc496677d0ecc24e4372b714849b5ecc8636b3a8;p=platform%2Fupstream%2Fllvm.git [Object][MachO] Rewrite macho-invalid-fat-arch-size into YAML Rewrite one of the invalid macho test input file with YAML file. The original invalid macho is breaking our internal test infrastusture because it is too broken to be copy around. rdar://problem/56879982 --- diff --git a/llvm/test/Object/Inputs/macho-invalid-fat-arch-size b/llvm/test/Object/Inputs/macho-invalid-fat-arch-size deleted file mode 100644 index dfd154c..0000000 Binary files a/llvm/test/Object/Inputs/macho-invalid-fat-arch-size and /dev/null differ diff --git a/llvm/test/Object/Inputs/macho-invalid-fat-arch-size.yaml b/llvm/test/Object/Inputs/macho-invalid-fat-arch-size.yaml new file mode 100644 index 0000000..f7bf00d --- /dev/null +++ b/llvm/test/Object/Inputs/macho-invalid-fat-arch-size.yaml @@ -0,0 +1,12 @@ +--- !fat-mach-o +FatHeader: + magic: 0xCAFEBABE + nfat_arch: 1 +FatArchs: + - cputype: 0x00000007 + cpusubtype: 0x00000003 + offset: 0x000000000000020 + size: 32 + align: 2 +Slices: +... diff --git a/llvm/test/Object/macho-invalid.test b/llvm/test/Object/macho-invalid.test index 1cbd746..2206c67 100644 --- a/llvm/test/Object/macho-invalid.test +++ b/llvm/test/Object/macho-invalid.test @@ -491,8 +491,8 @@ INVALID-EXPORT-OVERLAP: macho-invalid-export-overlap': truncated or malformed ob RUN: not llvm-objdump --macho --universal-headers %p/Inputs/macho-invalid-fat-header 2>&1 | FileCheck -check-prefix INVALID-FAT-HEADER %s INVALID-FAT-HEADER: macho-invalid-fat-header': truncated or malformed fat file (contains zero architecture types) -RUN: not llvm-objdump --macho --universal-headers %p/Inputs/macho-invalid-fat-arch-size 2>&1 | FileCheck -check-prefix INVALID-FAT-ARCH-SIZE %s -INVALID-FAT-ARCH-SIZE: macho-invalid-fat-arch-size': truncated or malformed fat file (offset plus size of cputype (7) cpusubtype (3) extends past the end of the file) +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 +INVALID-FAT-ARCH-SIZE: '-': truncated or malformed fat file (offset plus size of cputype (7) cpusubtype (3) extends past the end of the file) RUN: not llvm-objdump --macho --universal-headers %p/Inputs/macho-invalid-fat-arch-bigalign 2>&1 | FileCheck -check-prefix INVALID-FAT-ARCH-BIGALIGN %s 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))