From 76771afe22bb337377d47677ea40a8958e7762fb Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Tue, 13 Oct 2015 17:06:34 +0000 Subject: [PATCH] =?utf8?q?The=20issue=20with=20the=20malformed-machos=2000?= =?utf8?q?000031.a=20test=20is=20that=20it=20needed=20=E2=80=98-arch=20x86?= =?utf8?q?=5F64=E2=80=99=20flag=20as=20it=20was=20a=20Mach-O=20universal?= =?utf8?q?=20file.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250184 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/tools/llvm-objdump/X86/malformed-machos.test | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/tools/llvm-objdump/X86/malformed-machos.test b/test/tools/llvm-objdump/X86/malformed-machos.test index 6a7a93c3175..c98d08ca21d 100644 --- a/test/tools/llvm-objdump/X86/malformed-machos.test +++ b/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 + -- 2.34.1