diff options
author | Kevin Enderby <enderby@apple.com> | 2015-10-13 17:06:34 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2015-10-13 17:06:34 +0000 |
commit | d1c66ddf00242fef8f402d9c41a526fdcb79ba83 (patch) | |
tree | c853dca6ea1a1e2b09215ebf71ea95926a0f2e4d | |
parent | 9f8aaf21bae6296668bfe5f150da5fa1b0800d05 (diff) | |
download | llvm-d1c66ddf00242fef8f402d9c41a526fdcb79ba83.zip llvm-d1c66ddf00242fef8f402d9c41a526fdcb79ba83.tar.gz llvm-d1c66ddf00242fef8f402d9c41a526fdcb79ba83.tar.bz2 |
The issue with the malformed-machos 00000031.a test is that it needed ‘-arch x86_64’
flag as it was a Mach-O universal file.
The default as to which architecture slice that is dumped without an -arch flag
depends on the host architecture and the contents of the universal file. The
malformed archive 00000031.a file has both an x86_64 and i386 slice. So for
for x86_64 hosts only that slice is dumped, for non-x86_64 hosts, which is many
of the bots both slices are dumped.
The test is intended to only check that the malformation of the x86_64 which
has a non-decimal characters in the size field of the archive header so it no
longer crashes.
The problem turned out that the i388 slice of the malformed archive had a
different malformation which was causing the non-x86_64 bots to get this error:
llvm-objdump -macho -disassemble -arch i386 00000031.a
Archive : .00000031.a
00000031.a(c_start.o):
LLVM ERROR: Symbol name entry points before beginning or past end of file.
and causing the test as it was written to fail. So by adding ‘-arch x86_64’ it
should correct the test and the malformation on the i388 slice will not be
dumped.
Also the removal of the malformed-machos mem-crup-0261.macho was not causing
the issue so that is put back in.
Sorry for the churn on these tests, Kev
llvm-svn: 250184
-rw-r--r-- | llvm/test/tools/llvm-objdump/X86/malformed-machos.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objdump/X86/malformed-machos.test b/llvm/test/tools/llvm-objdump/X86/malformed-machos.test index 6a7a93c..c98d08c 100644 --- a/llvm/test/tools/llvm-objdump/X86/malformed-machos.test +++ b/llvm/test/tools/llvm-objdump/X86/malformed-machos.test @@ -31,8 +31,18 @@ # m0080: data 0xf960000 (struct class_ro_t *) +# RUN: llvm-objdump -macho -objc-meta-data \ +# RUN: %p/Inputs/malformed-machos/mem-crup-0261.macho + # RUN: llvm-objdump -macho -disassemble \ # RUN: %p/Inputs/malformed-machos/mem-crup-0337.macho \ # RUN: | FileCheck -check-prefix=m0337 %s # m0337: subq $16, %rsp + +# RUN: llvm-objdump -arch x86_64 -macho -disassemble \ +# RUN: %p/Inputs/malformed-machos/00000031.a \ +# RUN: | FileCheck -check-prefix=0031a %s + +# 0031a: Archive + |