[llvm-dev] AArch64 tests failing

Justin Bogner via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 19 21:44:08 PDT 2019


If you get a chance, could you try self-hosting with clang and enabling
asan+ubsan? If this is something where gcc 6.1.0 happens to do something
interesting with UB, that might catch it. Doing so may be as simple as
building with clang and passing -DLLVM_USE_SANITIZER='Address;Undefined'
to your cmake invocation.

David Greene via llvm-dev <llvm-dev at lists.llvm.org> writes:
> I seems to be a gcc miscompile.  We've seen other tests fail with gcc
> 6.1.0 (which we've been using) and those other failures and the ones I
> just reported go away with gcc 8.2.0.
>
> Now, it's theoretically possible that gcc 8.2.0 is just optimizing
> differently and not behaving the same way with some undefined behavior
> in the LLVM sources, but that seems less likely than a gcc bug, given
> that the many other compilers people use (not just gcc) aren't
> triggering any problems.
>
> Perhaps we should note that gcc 6.1.0 may be buggy when building on
> AArch64 here:
>
> http://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library
>
> I'm happy to make that change, but I unfortunately don't have time to
> verify *for sure* that gcc 6.1.0 is buggy.  It's just a theory at the
> moment.  Is it premature to add a note about gcc 6.1.0 on that page?
>
>                      -David
>
> Jordan Rupprecht <rupprecht at google.com> writes:
>
>> I only have an x86 to test with, so no. Are you able to get more information, perhaps running in debug mode to get line numbers?
>>
>> On Tue, Mar 19, 2019 at 8:06 AM David Greene via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>>  I'm seeing a bunch of failures on AArch64 after updating this morning.
>>  These are NOT failing on x86-64.  These all seem to be caused by
>>  segfaults (example backtrace below).  Is anyone else seeing this?
>>
>>                     -David
>>
>>      LLVM :: DebugInfo/symbolize-no-debug-str.test
>>      LLVM :: tools/gold/X86/comdat.ll
>>      LLVM :: tools/gold/X86/visibility.ll
>>      LLVM :: tools/llvm-objcopy/ELF/add-section-remove.test
>>      LLVM :: tools/llvm-objcopy/ELF/add-section.test
>>      LLVM :: tools/llvm-objcopy/ELF/armexidx-link.test
>>      LLVM :: tools/llvm-objcopy/ELF/auto-remove-shndx.test
>>      LLVM :: tools/llvm-objcopy/ELF/binary-first-seg-offset-zero.test
>>      LLVM :: tools/llvm-objcopy/ELF/binary-output-empty.test
>>      LLVM :: tools/llvm-objcopy/ELF/binary-remove-all-but-one.test
>>      LLVM :: tools/llvm-objcopy/ELF/binary-remove-end.test
>>      LLVM :: tools/llvm-objcopy/ELF/binary-remove-middle.test
>>      LLVM :: tools/llvm-objcopy/ELF/dynsym-error-remove-strtab.test
>>      LLVM :: tools/llvm-objcopy/ELF/explicit-keep-remove.test
>>      LLVM :: tools/llvm-objcopy/ELF/explicit-only-section-remove.test
>>      LLVM :: tools/llvm-objcopy/ELF/group-big-endian.test
>>      LLVM :: tools/llvm-objcopy/ELF/group-unchanged.test
>>      LLVM :: tools/llvm-objcopy/ELF/group.test
>>      LLVM :: tools/llvm-objcopy/ELF/keep-symbol-remove-section.test
>>      LLVM :: tools/llvm-objcopy/ELF/only-section-remove-strtab.test
>>      LLVM :: tools/llvm-objcopy/ELF/parent-loop-check.test
>>      LLVM :: tools/llvm-objcopy/ELF/reloc-error-remove-symtab.test
>>      LLVM :: tools/llvm-objcopy/ELF/remove-multiple-sections.test
>>      LLVM :: tools/llvm-objcopy/ELF/remove-section-in-segment.test
>>      LLVM :: tools/llvm-objcopy/ELF/remove-section-with-symbol.test
>>      LLVM :: tools/llvm-objcopy/ELF/remove-section.test
>>      LLVM :: tools/llvm-objcopy/ELF/remove-shndx.test
>>      LLVM :: tools/llvm-objcopy/ELF/remove-shstrtab-error.test
>>      LLVM :: tools/llvm-objcopy/ELF/remove-symtab.test
>>      LLVM :: tools/llvm-objcopy/ELF/segment-shift-section-remove.test
>>      LLVM :: tools/llvm-objcopy/ELF/segment-test-remove-section.test
>>      LLVM :: tools/llvm-objcopy/ELF/strict-no-add.test
>>      LLVM :: tools/llvm-objcopy/ELF/strip-all-and-remove.test
>>      LLVM :: tools/llvm-objcopy/ELF/strip-debug-and-remove.test
>>      LLVM :: tools/llvm-objcopy/ELF/strip-section-err.test
>>      LLVM :: tools/llvm-objcopy/ELF/symtab-error-on-remove-strtab.test
>>      LLVM :: tools/llvm-objcopy/ELF/two-seg-remove-end.test
>>      LLVM :: tools/llvm-objcopy/ELF/two-seg-remove-first.test
>>      LLVM :: tools/llvm-objcopy/ELF/two-seg-remove-third-sec.test
>>      LLVM :: tools/llvm-readobj/elf-no-relocs.test
>>
>>  ---------------------------------------------------
>>
>>  Lots of segfaults like this:
>>
>>  Stack dump:
>>  0.      Program arguments: /clang/build/aarch64/bin/llvm-objcopy -R .text -R s0 -R s1 -R s2 -R s3 -R s4 -R s5 -R s6 /clang/build/aarch64/test/tools/llvm-objcopy/ELF/Output/strict-no-add.test.tmp.0
>>  /clang/build/aarch64/test/tools/llvm-objcopy/ELF/Output/strict-no-add.test.tmp2 
>>   #0 0x0000ffff9ebbb498 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/clang/build/aarch64/bin/../lib/libLLVMSupport.so.9svn+0x177498)
>>   #1 0x0000ffff9ebb93e8 llvm::sys::RunSignalHandlers() (/clang/build/aarch64/bin/../lib/libLLVMSupport.so.9svn+0x1753e8)
>>   #2 0x0000ffff9ebb9540 SignalHandler(int) (/clang/build/aarch64/bin/../lib/libLLVMSupport.so.9svn+0x175540)
>>   #3 0x0000ffff9edac6c0 (linux-vdso.so.1+0x6c0)
>>   #4 0x000000000042a098 std::_Function_handler<bool (llvm::objcopy::elf::SectionBase const&), llvm::objcopy::elf::handleArgs(llvm::objcopy::CopyConfig const&, llvm::objcopy::elf::Object&, llvm::objcopy::elf::Reader const&,
>>  llvm::objcopy::elf::ElfType)::'lambda2'(llvm::objcopy::elf::SectionBase const&)>::_M_invoke(std::_Any_data const&, llvm::objcopy::elf::SectionBase const&) (/clang/build/aarch64/bin/llvm-objcopy+0x42a098)
>>   #5 0x0000000000432ca8 llvm::objcopy::elf::Object::removeSections(std::function<bool (llvm::objcopy::elf::SectionBase const&)>)::'lambda'(std::unique_ptr<llvm::objcopy::elf::SectionBase, std::default_delete<llvm::objcopy::elf::SectionBase> >
>>  const&)::operator()(std::unique_ptr<llvm::objcopy::elf::SectionBase, std::default_delete<llvm::objcopy::elf::SectionBase> > const&) const (/clang/build/aarch64/bin/llvm-objcopy+0x432ca8)
>>   #6 0x0000000000446514 llvm::objcopy::elf::Object::removeSections(std::function<bool (llvm::objcopy::elf::SectionBase const&)>) (/clang/build/aarch64/bin/llvm-objcopy+0x446514)
>>   #7 0x000000000042c660 llvm::objcopy::elf::handleArgs(llvm::objcopy::CopyConfig const&, llvm::objcopy::elf::Object&, llvm::objcopy::elf::Reader const&, llvm::objcopy::elf::ElfType) (/clang/build/aarch64/bin/llvm-objcopy+0x42c660)
>>   #8 0x000000000042e270 llvm::objcopy::elf::executeObjcopyOnBinary(llvm::objcopy::CopyConfig const&, llvm::object::ELFObjectFileBase&, llvm::objcopy::Buffer&) (/clang/build/aarch64/bin/llvm-objcopy+0x42e270)
>>   #9 0x000000000041699c executeObjcopyOnBinary(llvm::objcopy::CopyConfig const&, llvm::object::Binary&, llvm::objcopy::Buffer&) (/clang/build/aarch64/bin/llvm-objcopy+0x41699c)
>>  #10 0x000000000040a42c main (/clang/build/aarch64/bin/llvm-objcopy+0x40a42c)
>>  #11 0x0000ffff9e4fdae4 __libc_start_main (/lib64/libc.so.6+0x1fae4)
>>  #12 0x000000000040a9e8 _start /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/aarch64/start.S:86:0
>>  /clang/build/aarch64/test/tools/llvm-objcopy/ELF/Output/strict-no-add.test.script: line 5: 64367 Segmentation fault      (core dumped) /clang/build/aarch64/bin/llvm-objcopy -R .text -R s0 -R s1 -R s2 -R s3 -R s4 -R s5 -R s6
>>  /clang/build/aarch64/test/tools/llvm-objcopy/ELF/Output/strict-no-add.test.tmp.0 /clang/build/aarch64/test/tools/llvm-objcopy/ELF/Output/strict-no-add.test.tmp2
>>  _______________________________________________
>>  LLVM Developers mailing list
>>  llvm-dev at lists.llvm.org
>>  https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list