[llvm] r223306 - Move tests for llvm-objdump for universal files to X86 directory to fix build bots.

Rafael Espíndola rafael.espindola at gmail.com
Wed Dec 3 15:26:11 PST 2014


There is uninitialized memory at play. With valgrind I get:

/home/espindola/llvm/llvm/test/tools/llvm-objdump/X86/Inputs/macho-universal.x86_64.i386
(architecture ==12447== Syscall param write(buf) points to
unaddressable byte(s)
==12447==    at 0x3D1260E780: __write_nocancel (syscall-template.S:81)
==12447==    by 0x796392: llvm::raw_fd_ostream::write_impl(char
const*, unsigned long) (raw_ostream.cpp:569)
==12447==    by 0x7957E9: llvm::raw_ostream::write(char const*,
unsigned long) (raw_ostream.cpp:301)
==12447==    by 0x4074E5:
llvm::raw_ostream::operator<<(llvm::StringRef) (raw_ostream.h:169)
==12447==    by 0x427CB1: DisassembleInputMachO2(llvm::StringRef,
llvm::object::MachOObjectFile*, llvm::StringRef, llvm::StringRef)
(MachODump.cpp:1899)
==12447==    by 0x422BDB: llvm::DisassembleInputMachO(llvm::StringRef)
(MachODump.cpp:425)
==12447==    by 0x40D083: DumpInput(llvm::StringRef) (llvm-objdump.cpp:837)
==12447==    by 0x4113BB: void
(*std::for_each<__gnu_cxx::__normal_iterator<std::string*,
std::vector<std::string, std::allocator<std::string> > >, void
(*)(llvm::StringRef)>(__gnu_cxx::__normal_iterator<std::string*,
std::vector<std::string, std::allocator<std::string> > >,
__gnu_cxx::__normal_iterator<std::string*, std::vector<std::string,
std::allocator<std::string> > >, void
(*)(llvm::StringRef)))(llvm::StringRef) (stl_algo.h:4417)
==12447==    by 0x40D519: main (llvm-objdump.cpp:898)
==12447==  Address 0x4c34538 is 24 bytes inside a block of size 31 free'd
==12447==    at 0x4A07991: operator delete(void*) (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==12447==    by 0x3D216BE1C2: std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string()
(basic_string.h:539)
==12447==    by 0x422B34: llvm::DisassembleInputMachO(llvm::StringRef)
(MachODump.cpp:421)
==12447==    by 0x40D083: DumpInput(llvm::StringRef) (llvm-objdump.cpp:837)
==12447==    by 0x4113BB: void
(*std::for_each<__gnu_cxx::__normal_iterator<std::string*,
std::vector<std::string, std::allocator<std::string> > >, void
(*)(llvm::StringRef)>(__gnu_cxx::__normal_iterator<std::string*,
std::vector<std::string, std::allocator<std::string> > >,
__gnu_cxx::__normal_iterator<std::string*, std::vector<std::string,
std::allocator<std::string> > >, void
(*)(llvm::StringRef)))(llvm::StringRef) (stl_algo.h:4417)
==12447==    by 0x40D519: main (llvm-objdump.cpp:898)

I will revert for now.


On 3 December 2014 at 18:20, Rafael Espíndola
<rafael.espindola at gmail.com> wrote:
> It didn't work. On linux I am getting:
>
> /home/espindola/llvm/build/./bin/llvm-objdump
> /home/espindola/llvm/llvm/test/tools/llvm-objdump/X86/Inputs/macho-universal.x86_64.i386
> -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex -arch all
> /home/espindola/llvm/llvm/test/tools/llvm-objdump/X86/Inputs/macho-universal.x86_64.i386
> (architecture � ):
>
> On 3 December 2014 at 18:00, Kevin Enderby <enderby at apple.com> wrote:
>> Author: enderby
>> Date: Wed Dec  3 17:00:16 2014
>> New Revision: 223306
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=223306&view=rev
>> Log:
>> Move tests for llvm-objdump for universal files to X86 directory to fix build bots.
>>
>> Added:
>>     llvm/trunk/test/tools/llvm-objdump/X86/Inputs/macho-universal-archive.x86_64.i386   (with props)
>>     llvm/trunk/test/tools/llvm-objdump/X86/Inputs/macho-universal.x86_64.i386   (with props)
>>     llvm/trunk/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test
>> Removed:
>>     llvm/trunk/test/tools/llvm-objdump/Inputs/macho-universal-archive.x86_64.i386
>>     llvm/trunk/test/tools/llvm-objdump/Inputs/macho-universal.x86_64.i386
>>     llvm/trunk/test/tools/llvm-objdump/macho-universal-x86_64.i386.test
>>
>> Removed: llvm/trunk/test/tools/llvm-objdump/Inputs/macho-universal-archive.x86_64.i386
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/Inputs/macho-universal-archive.x86_64.i386?rev=223305&view=auto
>> ==============================================================================
>> Binary file - no diff available.
>>
>> Removed: llvm/trunk/test/tools/llvm-objdump/Inputs/macho-universal.x86_64.i386
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/Inputs/macho-universal.x86_64.i386?rev=223305&view=auto
>> ==============================================================================
>> Binary file - no diff available.
>>
>> Added: llvm/trunk/test/tools/llvm-objdump/X86/Inputs/macho-universal-archive.x86_64.i386
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/X86/Inputs/macho-universal-archive.x86_64.i386?rev=223306&view=auto
>> ==============================================================================
>> Binary file - no diff available.
>>
>> Propchange: llvm/trunk/test/tools/llvm-objdump/X86/Inputs/macho-universal-archive.x86_64.i386
>> ------------------------------------------------------------------------------
>>     svn:mime-type = application/octet-stream
>>
>> Added: llvm/trunk/test/tools/llvm-objdump/X86/Inputs/macho-universal.x86_64.i386
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/X86/Inputs/macho-universal.x86_64.i386?rev=223306&view=auto
>> ==============================================================================
>> Binary file - no diff available.
>>
>> Propchange: llvm/trunk/test/tools/llvm-objdump/X86/Inputs/macho-universal.x86_64.i386
>> ------------------------------------------------------------------------------
>>     svn:executable = *
>>
>> Propchange: llvm/trunk/test/tools/llvm-objdump/X86/Inputs/macho-universal.x86_64.i386
>> ------------------------------------------------------------------------------
>>     svn:mime-type = application/octet-stream
>>
>> Added: llvm/trunk/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test?rev=223306&view=auto
>> ==============================================================================
>> --- llvm/trunk/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test (added)
>> +++ llvm/trunk/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test Wed Dec  3 17:00:16 2014
>> @@ -0,0 +1,25 @@
>> +RUN: llvm-objdump %p/Inputs/macho-universal.x86_64.i386 -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex -arch all \
>> +RUN: | FileCheck %s -check-prefix UEXE-all
>> +RUN: llvm-objdump %p/Inputs/macho-universal-archive.x86_64.i386 -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex -arch i386 \
>> +RUN: | FileCheck %s -check-prefix UArchive-i386
>> +
>> +UEXE-all: macho-universal.x86_64.i386 (architecture x86_64):
>> +UEXE-all: (__TEXT,__text) section
>> +UEXE-all: _main:
>> +UEXE-all: 0000000100000f60     pushq   %rbp
>> +UEXE-all: 0000000100000f61     movq    %rsp, %rbp
>> +UEXE-all: macho-universal.x86_64.i386 (architecture i386):
>> +UEXE-all: (__TEXT,__text) section
>> +UEXE-all: _main:
>> +UEXE-all: 00001fa0     pushl   %ebp
>> +UEXE-all: 00001fa1     movl    %esp, %ebp
>> +
>> +UArchive-i386: Archive : {{.*}}/macho-universal-archive.x86_64.i386
>> +UArchive-i386: macho-universal-archive.x86_64.i386(foo.o):
>> +UArchive-i386: (__TEXT,__text) section
>> +UArchive-i386: _foo:
>> +UArchive-i386: 00000000        pushl   %ebp
>> +UArchive-i386: 00000001        movl    %esp, %ebp
>> +UArchive-i386: 00000003        popl    %ebp
>> +UArchive-i386: 00000004        retl
>> +
>>
>> Removed: llvm/trunk/test/tools/llvm-objdump/macho-universal-x86_64.i386.test
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/macho-universal-x86_64.i386.test?rev=223305&view=auto
>> ==============================================================================
>> --- llvm/trunk/test/tools/llvm-objdump/macho-universal-x86_64.i386.test (original)
>> +++ llvm/trunk/test/tools/llvm-objdump/macho-universal-x86_64.i386.test (removed)
>> @@ -1,25 +0,0 @@
>> -RUN: llvm-objdump %p/Inputs/macho-universal.x86_64.i386 -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex -arch all \
>> -RUN: | FileCheck %s -check-prefix UEXE-all
>> -RUN: llvm-objdump %p/Inputs/macho-universal-archive.x86_64.i386 -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex -arch i386 \
>> -RUN: | FileCheck %s -check-prefix UArchive-i386
>> -
>> -UEXE-all: macho-universal.x86_64.i386 (architecture x86_64):
>> -UEXE-all: (__TEXT,__text) section
>> -UEXE-all: _main:
>> -UEXE-all: 0000000100000f60     pushq   %rbp
>> -UEXE-all: 0000000100000f61     movq    %rsp, %rbp
>> -UEXE-all: macho-universal.x86_64.i386 (architecture i386):
>> -UEXE-all: (__TEXT,__text) section
>> -UEXE-all: _main:
>> -UEXE-all: 00001fa0     pushl   %ebp
>> -UEXE-all: 00001fa1     movl    %esp, %ebp
>> -
>> -UArchive-i386: Archive : {{.*}}/macho-universal-archive.x86_64.i386
>> -UArchive-i386: macho-universal-archive.x86_64.i386(foo.o):
>> -UArchive-i386: (__TEXT,__text) section
>> -UArchive-i386: _foo:
>> -UArchive-i386: 00000000        pushl   %ebp
>> -UArchive-i386: 00000001        movl    %esp, %ebp
>> -UArchive-i386: 00000003        popl    %ebp
>> -UArchive-i386: 00000004        retl
>> -
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list