[llvm-bugs] [Bug 36487] New: Compiler crash when cross-compiling lz4

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 23 01:40:41 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36487

            Bug ID: 36487
           Summary: Compiler crash when cross-compiling lz4
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: gk at torproject.org
                CC: llvm-bugs at lists.llvm.org

Created attachment 19934
  --> https://bugs.llvm.org/attachment.cgi?id=19934&action=edit
lz4-preprocessed source

Over at Mozilla's https://bugzilla.mozilla.org/show_bug.cgi?id=1390583 we are
trying to get Firefox cross-compiled for Windows using clang. This works thanks
to the efforts by Martin Storsjö and others if I compile Firefox 52 ESR (the
current long-term support version of Firefox). However, clang crashes during
compilation of the latest Mozilla code after lz4 got updated to version 1.8.0.

Here is the stack trace and bit of info and attached is the preprocessed source
and the associated run script.

 1:21.66 #0 0x000055d9043c9b9a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x1614b9a)
 1:21.66 #1 0x000055d9043c7a3e llvm::sys::RunSignalHandlers()
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x1612a3e)
 1:21.66 #2 0x000055d9043c7b8c SignalHandler(int)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x1612b8c)
 1:21.66 #3 0x00007fb418711180 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12180)
 1:21.66 #4 0x00007fb41724c6a0 gsignal
(/lib/x86_64-linux-gnu/libc.so.6+0x346a0)
 1:21.66 #5 0x00007fb41724dcf7 abort (/lib/x86_64-linux-gnu/libc.so.6+0x35cf7)
 1:21.66 #6 0x00007fb417244fca (/lib/x86_64-linux-gnu/libc.so.6+0x2cfca)
 1:21.66 #7 0x00007fb417245042 (/lib/x86_64-linux-gnu/libc.so.6+0x2d042)
 1:21.66 #8 0x000055d90379fd65
llvm::X86FrameLowering::emitPrologue(llvm::MachineFunction&,
llvm::MachineBasicBlock&) const
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x9ead65)
 1:21.66 #9 0x000055d903d97df8 (anonymous
namespace)::PEI::runOnMachineFunction(llvm::MachineFunction&)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0xfe2df8)
 1:21.66 #10 0x000055d903b9aa35
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0xde5a35)
 1:21.66 #11 0x000055d903f4d563
llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x1198563)
 1:21.66 #12 0x000055d903f4d624 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x1198624)
 1:21.66 #13 0x000055d903f4e241
llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x1199241)
 1:21.66 #14 0x000055d904597e0e (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x17e2e0e)
 1:21.66 #15 0x000055d90459956c
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions
const&, clang::CodeGenOptions const&, clang::TargetOptions const&,
clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*,
clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x17e456c)
 1:21.66 #16 0x000055d904cfc104
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x1f47104)
 1:21.66 #17 0x000055d9051c7340 clang::ParseAST(clang::Sema&, bool, bool)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x2412340)
 1:21.66 #18 0x000055d904cfb2b9 clang::CodeGenAction::ExecuteAction()
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x1f462b9)
 1:21.66 #19 0x000055d904985236 clang::FrontendAction::Execute()
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x1bd0236)
 1:21.67 #20 0x000055d90494d586
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x1b98586)
 1:21.67 #21 0x000055d904a1ba91
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x1c66a91)
 1:21.67 #22 0x000055d903732440 cc1_main(llvm::ArrayRef<char const*>, char
const*, void*)
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x97d440)
 1:21.67 #23 0x000055d9036e94b5 main
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x9344b5)
 1:21.67 #24 0x00007fb417238f2a __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x20f2a)
 1:21.67 #25 0x000055d90372e55a _start
(/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0+0x97955a)
 1:21.67 Stack dump:
 1:21.67 0.     Program arguments:
/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/bin/clang-7.0 -cc1
-triple x86_64-w64-windows-gnu -emit-obj -disable-free -main-file-name lz4.c
-mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim
-relaxed-aliasing -masm-verbose -mconstructor-aliases -mms-bitfields
-munwind-tables -target-cpu x86-64 -dwarf-column-info -debug-info-kind=limited
-dwarf-version=4 -debugger-tuning=gdb -momit-leaf-frame-pointer
-coverage-notes-file
/home/thomas/Arbeit/Tor/debugging/21777/obj-mingw/mfbt/lz4.gcno -resource-dir
/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/lib/clang/7.0.0
-dependency-file .deps/lz4.o.pp -MT lz4.o -sys-header-deps -MP -include
/home/thomas/Arbeit/Tor/debugging/21777/obj-mingw/mozilla-config.h -D NDEBUG=1
-D TRIMMED=1 -D IMPL_MFBT -D LZ4LIB_VISIBILITY= -I
/home/thomas/Arbeit/Tor/debugging/21777/mfbt -I
/home/thomas/Arbeit/Tor/debugging/21777/obj-mingw/mfbt -I
/home/thomas/Arbeit/Tor/debugging/21777/mfbt/double-conversion -I
/home/thomas/Arbeit/Tor/debugging/21777/obj-mingw/dist/include -I
/home/thomas/Arbeit/Tor/debugging/21777/obj-mingw/dist/include/nspr -I
/home/thomas/Arbeit/Tor/debugging/21777/obj-mingw/dist/include/nss -D
MOZILLA_CLIENT -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=2 -U _FORTIFY_SOURCE -D
_FORTIFY_SOURCE=2 -isysroot
/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/x86_64-w64-mingw32
-internal-isystem
/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/lib/clang/7.0.0/include
-internal-isystem
/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/x86_64-w64-mingw32/x86_64-w64-mingw32/include
-internal-isystem
/home/thomas/Arbeit/Tor/debugging/win59/clang_toolchain/x86_64-w64-mingw32/include
-O2 -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare
-Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wclass-varargs
-Wloop-analysis -Wstring-conversion -Wno-error=deprecated-declarations
-Wno-error=array-bounds -Wno-unknown-pragmas -Wno-unused-function
-Wno-conversion-null -Wno-switch -Wno-enum-compare
-Wno-gnu-zero-variadic-macro-arguments -std=gnu99 -fdebug-compilation-dir
/home/thomas/Arbeit/Tor/debugging/21777/obj-mingw/mfbt -ferror-limit 19
-fmessage-length 0 -fno-use-cxa-atexit -fobjc-runtime=gcc -fdwarf-exceptions
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -o lz4.o -x c
/home/thomas/Arbeit/Tor/debugging/21777/mfbt/lz4.c
 1:21.67 1.     <eof> parser at end of file
 1:21.67 2.     Code generation
 1:21.67 3.     Running pass 'Function Pass Manager' on module
'/home/thomas/Arbeit/Tor/debugging/21777/mfbt/lz4.c'.
 1:21.67 4.     Running pass 'Prologue/Epilogue Insertion & Frame Finalization'
on function '@LZ4_compress'
 1:21.67 clang-7.0: error: unable to execute command: Aborted
 1:21.67 clang-7.0: error: clang frontend command failed due to signal (use -v
to see invocation)
 1:21.67 clang version 7.0.0 (https://git.llvm.org/git/clang
0972dc790621cb6c6718ef9a5090a993cc0724c2) (https://github.com/llvm-mirror/llvm
d5784797c6647bd72ab37232ab432785a04a71df)
 1:21.67 Target: x86_64-w64-windows-gnu
 1:21.67 Thread model: posix

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180223/f84705a8/attachment-0001.html>


More information about the llvm-bugs mailing list