llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
26.69k stars 10.93k forks source link

dront end bug while compiling mozilla firefox #94619

Open donharter opened 3 weeks ago

donharter commented 3 weeks ago
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
 3:29.65 Stack dump:
 3:29.67 0. Program arguments: /home/drh/.mozbuild/clang/bin/clang++ --sysroot /home/drh/.mozbuild/sysroot-x86_64-linux-gnu -o Unified_cpp_protocol_websocket0.o -c -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/stl_wrappers -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/system_wrappers -include /home/drh/src/mozilla-unified/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -DNDEBUG=1 -DTRIMMED=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/home/drh/src/mozilla-unified/netwerk/protocol/websocket -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/netwerk/protocol/websocket -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/ipc/ipdl/_ipdlheaders -I/home/drh/src/mozilla-unified/ipc/chromium/src -I/home/drh/src/mozilla-unified/dom/base -I/home/drh/src/mozilla-unified/netwerk/base -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/include -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/include/nspr -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/include/nss -DMOZILLA_CLIENT -include /home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/mozilla-config.h -fno-rtti -pthread -fno-sized-deallocation -fno-aligned-new -fno-math-errno -fno-exceptions -fno-exceptions -fPIC -gdwarf-4 -O2 -fno-omit-frame-pointer -funwind-tables -Wall -Wbitfield-enum-conversion -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wenum-compare-conditional -Wenum-float-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wformat -Wformat-security -Wno-psabi -Wthread-safety -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -fno-strict-aliasing -ffp-contract=off -MD -MP -MF .deps/Unified_cpp_protocol_websocket0.o.pp -fcolor-diagnostics Unified_cpp_protocol_websocket0.cpp
 3:29.67 1. <eof> parser at end of file
 3:29.67 2. Code generation
 3:29.68 3. Running pass 'Function Pass Manager' on module 'Unified_cpp_protocol_websocket0.cpp'.
 3:29.68 4. Running pass 'X86 Assembly Printer' on function '@_ZN7mozilla3net20BaseWebSocketChannel12SetLoadGroupEP12nsILoadGroup'
 3:30.09  #0 0x00007f176ae07118 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2607118)
 3:30.10  #1 0x00007f176ae06c79 llvm::sys::CleanupOnSignal(unsigned long) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2606c79)
 3:30.10  #2 0x00007f176ad917de (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) CrashRecoveryContext.cpp:0:0
 3:30.11  #3 0x00007f176ad9198e CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 3:30.11  #4 0x00007f1768042520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 3:30.11  #5 0x00007f17680a3ac1 _int_malloc ./malloc/malloc.c:3937:17
 3:30.11  #6 0x00007f17680a4b8a _int_realloc ./malloc/malloc.c:4878:20
 3:30.11  #7 0x00007f17680a5909 __libc_realloc ./malloc/malloc.c:3485:14
 3:30.11  #8 0x00007f1769e5872d llvm::SmallVectorBase<unsigned int>::grow_pod(void*, unsigned long, unsigned long) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x165872d)
 3:30.11  #9 0x00007f176b2d488a llvm::DbgValueHistoryMap::trimLocationRanges(llvm::MachineFunction const&, llvm::LexicalScopes&, llvm::InstructionOrdering const&) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2ad488a)
 3:30.12 #10 0x00007f176b2da566 llvm::DebugHandlerBase::beginFunction(llvm::MachineFunction const*) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2ada566)
 3:30.12 #11 0x00007f176b2c41aa llvm::AsmPrinter::emitFunctionHeader() (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2ac41aa)
 3:30.12 #12 0x00007f176b2c5fcd llvm::AsmPrinter::emitFunctionBody() (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2ac5fcd)
 3:30.12 #13 0x00007f176bfeb97d llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction&) X86AsmPrinter.cpp:0:0
 3:30.12 #14 0x00007f176b03d4b5 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x283d4b5)
 3:30.12 #15 0x00007f176a73aa16 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x1f3aa16)
 3:30.12 #16 0x00007f176a73a62f llvm::FPPassManager::runOnModule(llvm::Module&) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x1f3a62f)
 3:30.13 #17 0x00007f176ac32134 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2432134)
 3:30.13 #18 0x00007f176f3a63d5 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x25a63d5)
 3:30.13 #19 0x00007f176f6655d4 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x28655d4)
 3:30.13 #20 0x00007f176e7ccc00 clang::ParseAST(clang::Sema&, bool, bool) (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x19ccc00)
 3:30.14 #21 0x00007f176e81274c clang::FrontendAction::Execute() (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x1a1274c)
 3:30.14 #22 0x00007f176e81226c clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x1a1226c)
 3:30.14 #23 0x00007f176fd5dfd8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x2f5dfd8)
 3:30.14 #24 0x000055e81d88b861 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/drh/.mozbuild/clang/bin/clang+++0x12861)
 3:30.14 #25 0x000055e81d883f6e ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
 3:30.14 #26 0x00007f176f95ca09 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::$_0>(long) Job.cpp:0:0
 3:30.15 #27 0x00007f176ad91777 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2591777)
 3:30.15 #28 0x00007f176e7fda8e clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x19fda8e)
 3:30.15 #29 0x00007f176e720cf6 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x1920cf6)
 3:30.15 #30 0x00007f176e720470 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x1920470)
 3:30.15 #31 0x000055e81d887b8a clang_main(int, char**, llvm::ToolContext const&) (/home/drh/.mozbuild/clang/bin/clang+++0xeb8a)
 3:30.15 #32 0x000055e81d884bd4 main (/home/drh/.mozbuild/clang/bin/clang+++0xbbd4)
 3:30.16 #33 0x00007f1768029d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
 3:30.16 #34 0x00007f1768029e40 call_init ./csu/../csu/libc-start.c:128:20
 3:30.16 #35 0x00007f1768029e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
 3:30.16 #36 0x000055e81d889190 _start (/home/drh/.mozbuild/clang/bin/clang+++0x10190)
 3:30.16 clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
 3:30.16 clang version 18.1.5 (taskcluster-bOc4I0XnSJe6lBPSFf68qw)
 3:30.16 Target: x86_64-unknown-linux-gnu
 3:30.16 Thread model: posix
 3:30.16 InstalledDir: /home/drh/.mozbuild/clang/bin
 3:30.99 clang++: note: diagnostic msg:
 3:30.99 ********************

It wants me to attach 2 files, but the web report form does not support those file types. .cpp .sh OK I will put them in a zip archive and attach it. llvm.zip

dpkg -l "*llvm*" | grep ii
ii  libllvm12:amd64         1:12.0.1-19ubuntu3        amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm13:amd64         1:13.0.1-2ubuntu2.2       amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm14:amd64         1:14.0.0-1ubuntu1.1       amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm15:amd64         1:15.0.7-0ubuntu0.22.04.3 amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm15:i386          1:15.0.7-0ubuntu0.22.04.3 i386         Modular compiler and toolchain technologies, runtime library
ii  libllvmspirvlib12:amd64 12.0.0-3                  amd64        bi-directional translator for LLVM/SPIRV -- shared library
ii  llvm-15                 1:15.0.7-0ubuntu0.22.04.3 amd64        Modular compiler and toolchain technologies
ii  llvm-15-dev             1:15.0.7-0ubuntu0.22.04.3 amd64        Modular compiler and toolchain technologies, libraries and headers
ii  llvm-15-doc             1:15.0.7-0ubuntu0.22.04.3 all          Modular compiler and toolchain technologies, documentation
ii  llvm-15-linker-tools    1:15.0.7-0ubuntu0.22.04.3 amd64        Modular compiler and toolchain technologies - Plugins
ii  llvm-15-runtime         1:15.0.7-0ubuntu0.22.04.3 amd64        Modular compiler and toolchain technologies, IR interpreter
ii  llvm-15-tools           1:15.0.7-0ubuntu0.22.04.3 amd64        Modular compiler and toolchain technologies, tools

dpkg -l "*clang*" | grep ii
ii  clang-format:amd64      1:14.0-55~exp2            amd64        Tool to format C/C++/Obj-C code
ii  clang-format-14         1:14.0.0-1ubuntu1.1       amd64        Tool to format C/C++/Obj-C code
ii  libclang-13-dev         1:13.0.1-2ubuntu2.2       amd64        Clang library - Development package
ii  libclang-common-13-dev  1:13.0.1-2ubuntu2.2       amd64        Clang library - Common development package
ii  libclang-cpp12          1:12.0.1-19ubuntu3        amd64        C++ interface to the Clang library
ii  libclang-cpp13          1:13.0.1-2ubuntu2.2       amd64        C++ interface to the Clang library
ii  libclang-cpp13-dev      1:13.0.1-2ubuntu2.2       amd64        C++ interface to the Clang library
ii  libclang-cpp14          1:14.0.0-1ubuntu1.1       amd64        C++ interface to the Clang library
ii  libclang-cpp15          1:15.0.7-0ubuntu0.22.04.3 amd64        C++ interface to the Clang library
ii  libclang1-13            1:13.0.1-2ubuntu2.2       amd64        C interface to the Clang library
ii  libclang1-14            1:14.0.6-1~oibaf~j        amd64        C interface to the Clang library
ii  libopencl-clang12:amd64 12.0.0-3                  amd64        thin wrapper for clang
llvmbot commented 3 weeks ago

@llvm/issue-subscribers-backend-x86

Author: None (donharter)

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script. 3:29.65 Stack dump: 3:29.67 0. Program arguments: /home/drh/.mozbuild/clang/bin/clang++ --sysroot /home/drh/.mozbuild/sysroot-x86_64-linux-gnu -o Unified_cpp_protocol_websocket0.o -c -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/stl_wrappers -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/system_wrappers -include /home/drh/src/mozilla-unified/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -DNDEBUG=1 -DTRIMMED=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/home/drh/src/mozilla-unified/netwerk/protocol/websocket -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/netwerk/protocol/websocket -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/ipc/ipdl/_ipdlheaders -I/home/drh/src/mozilla-unified/ipc/chromium/src -I/home/drh/src/mozilla-unified/dom/base -I/home/drh/src/mozilla-unified/netwerk/base -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/include -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/include/nspr -I/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/dist/include/nss -DMOZILLA_CLIENT -include /home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/mozilla-config.h -fno-rtti -pthread -fno-sized-deallocation -fno-aligned-new -fno-math-errno -fno-exceptions -fno-exceptions -fPIC -gdwarf-4 -O2 -fno-omit-frame-pointer -funwind-tables -Wall -Wbitfield-enum-conversion -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wenum-compare-conditional -Wenum-float-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wformat -Wformat-security -Wno-psabi -Wthread-safety -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -fno-strict-aliasing -ffp-contract=off -MD -MP -MF .deps/Unified_cpp_protocol_websocket0.o.pp -fcolor-diagnostics Unified_cpp_protocol_websocket0.cpp 3:29.67 1. <eof> parser at end of file 3:29.67 2. Code generation 3:29.68 3. Running pass 'Function Pass Manager' on module 'Unified_cpp_protocol_websocket0.cpp'. 3:29.68 4. Running pass 'X86 Assembly Printer' on function '@_ZN7mozilla3net20BaseWebSocketChannel12SetLoadGroupEP12nsILoadGroup' 3:30.09 #0 0x00007f176ae07118 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2607118) 3:30.10 #1 0x00007f176ae06c79 llvm::sys::CleanupOnSignal(unsigned long) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2606c79) 3:30.10 #2 0x00007f176ad917de (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) CrashRecoveryContext.cpp:0:0 3:30.11 #3 0x00007f176ad9198e CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0 3:30.11 #4 0x00007f1768042520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520) 3:30.11 #5 0x00007f17680a3ac1 _int_malloc ./malloc/malloc.c:3937:17 3:30.11 #6 0x00007f17680a4b8a _int_realloc ./malloc/malloc.c:4878:20 3:30.11 #7 0x00007f17680a5909 __libc_realloc ./malloc/malloc.c:3485:14 3:30.11 #8 0x00007f1769e5872d llvm::SmallVectorBase<unsigned int>::grow_pod(void*, unsigned long, unsigned long) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x165872d) 3:30.11 #9 0x00007f176b2d488a llvm::DbgValueHistoryMap::trimLocationRanges(llvm::MachineFunction const&, llvm::LexicalScopes&, llvm::InstructionOrdering const&) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2ad488a) 3:30.12 #10 0x00007f176b2da566 llvm::DebugHandlerBase::beginFunction(llvm::MachineFunction const*) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2ada566) 3:30.12 #11 0x00007f176b2c41aa llvm::AsmPrinter::emitFunctionHeader() (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2ac41aa) 3:30.12 #12 0x00007f176b2c5fcd llvm::AsmPrinter::emitFunctionBody() (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2ac5fcd) 3:30.12 #13 0x00007f176bfeb97d llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction&) X86AsmPrinter.cpp:0:0 3:30.12 #14 0x00007f176b03d4b5 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x283d4b5) 3:30.12 #15 0x00007f176a73aa16 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x1f3aa16) 3:30.12 #16 0x00007f176a73a62f llvm::FPPassManager::runOnModule(llvm::Module&) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x1f3a62f) 3:30.13 #17 0x00007f176ac32134 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2432134) 3:30.13 #18 0x00007f176f3a63d5 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x25a63d5) 3:30.13 #19 0x00007f176f6655d4 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x28655d4) 3:30.13 #20 0x00007f176e7ccc00 clang::ParseAST(clang::Sema&, bool, bool) (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x19ccc00) 3:30.14 #21 0x00007f176e81274c clang::FrontendAction::Execute() (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x1a1274c) 3:30.14 #22 0x00007f176e81226c clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x1a1226c) 3:30.14 #23 0x00007f176fd5dfd8 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x2f5dfd8) 3:30.14 #24 0x000055e81d88b861 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/drh/.mozbuild/clang/bin/clang+++0x12861) 3:30.14 #25 0x000055e81d883f6e ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0 3:30.14 #26 0x00007f176f95ca09 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::$_0>(long) Job.cpp:0:0 3:30.15 #27 0x00007f176ad91777 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/drh/.mozbuild/clang/bin/../lib/libLLVM.so.18.1+0x2591777) 3:30.15 #28 0x00007f176e7fda8e clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x19fda8e) 3:30.15 #29 0x00007f176e720cf6 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x1920cf6) 3:30.15 #30 0x00007f176e720470 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/home/drh/.mozbuild/clang/bin/../lib/libclang-cpp.so.18.1+0x1920470) 3:30.15 #31 0x000055e81d887b8a clang_main(int, char**, llvm::ToolContext const&) (/home/drh/.mozbuild/clang/bin/clang+++0xeb8a) 3:30.15 #32 0x000055e81d884bd4 main (/home/drh/.mozbuild/clang/bin/clang+++0xbbd4) 3:30.16 #33 0x00007f1768029d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16 3:30.16 #34 0x00007f1768029e40 call_init ./csu/../csu/libc-start.c:128:20 3:30.16 #35 0x00007f1768029e40 __libc_start_main ./csu/../csu/libc-start.c:379:5 3:30.16 #36 0x000055e81d889190 _start (/home/drh/.mozbuild/clang/bin/clang+++0x10190) 3:30.16 clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation) 3:30.16 clang version 18.1.5 (taskcluster-bOc4I0XnSJe6lBPSFf68qw) 3:30.16 Target: x86_64-unknown-linux-gnu 3:30.16 Thread model: posix 3:30.16 InstalledDir: /home/drh/.mozbuild/clang/bin 3:30.99 clang++: note: diagnostic msg: 3:30.99 ******************** It wants me to attach 2 files, but the web report form does not support those file types. .cpp .sh OK I will put them in a zip archive and attach it. [llvm.zip](https://github.com/user-attachments/files/15631362/llvm.zip) dpkg -l "*llvm*" | grep ii ii libllvm12:amd64 1:12.0.1-19ubuntu3 amd64 Modular compiler and toolchain technologies, runtime library ii libllvm13:amd64 1:13.0.1-2ubuntu2.2 amd64 Modular compiler and toolchain technologies, runtime library ii libllvm14:amd64 1:14.0.0-1ubuntu1.1 amd64 Modular compiler and toolchain technologies, runtime library ii libllvm15:amd64 1:15.0.7-0ubuntu0.22.04.3 amd64 Modular compiler and toolchain technologies, runtime library ii libllvm15:i386 1:15.0.7-0ubuntu0.22.04.3 i386 Modular compiler and toolchain technologies, runtime library ii libllvmspirvlib12:amd64 12.0.0-3 amd64 bi-directional translator for LLVM/SPIRV -- shared library ii llvm-15 1:15.0.7-0ubuntu0.22.04.3 amd64 Modular compiler and toolchain technologies ii llvm-15-dev 1:15.0.7-0ubuntu0.22.04.3 amd64 Modular compiler and toolchain technologies, libraries and headers ii llvm-15-doc 1:15.0.7-0ubuntu0.22.04.3 all Modular compiler and toolchain technologies, documentation ii llvm-15-linker-tools 1:15.0.7-0ubuntu0.22.04.3 amd64 Modular compiler and toolchain technologies - Plugins ii llvm-15-runtime 1:15.0.7-0ubuntu0.22.04.3 amd64 Modular compiler and toolchain technologies, IR interpreter ii llvm-15-tools 1:15.0.7-0ubuntu0.22.04.3 amd64 Modular compiler and toolchain technologies, tools dpkg -l "*clang*" | grep ii ii clang-format:amd64 1:14.0-55~exp2 amd64 Tool to format C/C++/Obj-C code ii clang-format-14 1:14.0.0-1ubuntu1.1 amd64 Tool to format C/C++/Obj-C code ii libclang-13-dev 1:13.0.1-2ubuntu2.2 amd64 Clang library - Development package ii libclang-common-13-dev 1:13.0.1-2ubuntu2.2 amd64 Clang library - Common development package ii libclang-cpp12 1:12.0.1-19ubuntu3 amd64 C++ interface to the Clang library ii libclang-cpp13 1:13.0.1-2ubuntu2.2 amd64 C++ interface to the Clang library ii libclang-cpp13-dev 1:13.0.1-2ubuntu2.2 amd64 C++ interface to the Clang library ii libclang-cpp14 1:14.0.0-1ubuntu1.1 amd64 C++ interface to the Clang library ii libclang-cpp15 1:15.0.7-0ubuntu0.22.04.3 amd64 C++ interface to the Clang library ii libclang1-13 1:13.0.1-2ubuntu2.2 amd64 C interface to the Clang library ii libclang1-14 1:14.0.6-1~oibaf~j amd64 C interface to the Clang library ii libopencl-clang12:amd64 12.0.0-3 amd64 thin wrapper for clang
Endilll commented 3 weeks ago

This doesn't reproduce for me with a nightly build of main at f34dedbf44a0 (approximately a week old commit) from https://apt.llvm.org This issue is unlikely to be fixed in 18.x branch, because it's almost out of support at this point, so you should check whether it reproduces on a relatively recent build of main branch.

donharter commented 3 weeks ago

I tried with the latest and got this error. I found a bug report in the rust site which says that this is a llvm problem. I see some references to llvm18.1 but here is what I have installed.

ii  llvm-15              1:15.0.7-0ubuntu0.22.04.3                                     amd64        Modular compiler and toolchain technologies
ii  llvm-15-dev          1:15.0.7-0ubuntu0.22.04.3                                     amd64        Modular compiler and toolchain technologies, libraries an>
ii  llvm-15-doc          1:15.0.7-0ubuntu0.22.04.3                                     all          Modular compiler and toolchain technologies, documentation
ii  llvm-15-linker-tools 1:15.0.7-0ubuntu0.22.04.3                                     amd64        Modular compiler and toolchain technologies - Plugins
ii  llvm-15-runtime      1:15.0.7-0ubuntu0.22.04.3                                     amd64        Modular compiler and toolchain technologies, IR interpret>
ii  llvm-15-tools        1:15.0.7-0ubuntu0.22.04.3                                     amd64        Modular compiler and toolchain technologies, tools
ii  llvm-19              1:19~++20240605042151+7db4e6c1ec18-1~exp1~20240605042316.1726 amd64        Modular compiler and toolchain technologies
ii  llvm-19-dev          1:19~++20240605042151+7db4e6c1ec18-1~exp1~20240605042316.1726 amd64        Modular compiler and toolchain technologies, libraries an>
ii  llvm-19-doc          1:19~++20240605042151+7db4e6c1ec18-1~exp1~20240605042316.1726 all          Modular compiler and toolchain technologies, documentation
ii  llvm-19-examples     1:19~++20240605042151+7db4e6c1ec18-1~exp1~20240605042316.1726 all          Modular compiler and toolchain technologies, examples
ii  llvm-19-linker-tools 1:19~++20240605042151+7db4e6c1ec18-1~exp1~20240605042316.1726 amd64        Modular compiler and toolchain technologies - Plugins
ii  llvm-19-runtime      1:19~++20240605042151+7db4e6c1ec18-1~exp1~20240605042316.1726 amd64        Modular compiler and toolchain technologies, IR interpret>
ii  llvm-19-tools        1:19~++20240605042151+7db4e6c1ec18-1~exp1~20240605042316.1726 amd64        Modular compiler and toolchain technologies, tools
Maybe the firefox source code has 18.1 embedded in it?
3:11.48    Compiling rustc-hash v1.1.0
 3:11.85 error: rustc interrupted by SIGSEGV, printing backtrace
 3:11.86 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-d6f66a8619a171d6.so(+0x2e40fd3)[0x7f298a840fd3]
 3:11.86 /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f2987642520]
 3:11.87 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM.so.18.1-rust-1.78.0-stable(+0x5e4a6a1)[0x7f2985c4a6a1]
 3:11.87 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM.so.18.1-rust-1.78.0-stable(+0x5c29ad2)[0x7f2985a29ad2]
 3:11.87 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM.so.18.1-rust-1.78.0-stable(_ZN4llvm11InlinerPass3runERNS_13LazyCallGraph3SCCERNS_15AnalysisManagerIS2_JRS1_EEES5_RNS_17CGSCCUpdateResultE+0x89b)[0x7f2985c75bad]
 3:11.87 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM.so.18.1-rust-1.78.0-stable(+0x5e7530d)[0x7f2985c7530d]
 3:11.88 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM.so.18.1-rust-1.78.0-stable(_ZN4llvm11PassManagerINS_13LazyCallGraph3SCCENS_15AnalysisManagerIS2_JRS1_EEEJS4_RNS_17CGSCCUpdateResultEEE3runERS2_RS5_S4_S7_+0x5c2)[0x7f2985c71920]
 3:11.88 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM.so.18.1-rust-1.78.0-stable(_ZN4llvm21DevirtSCCRepeatedPass3runERNS_13LazyCallGraph3SCCERNS_15AnalysisManagerIS2_JRS1_EEES5_RNS_17CGSCCUpdateResultE+0x183)[0x7f2985c70843]
 3:11.89 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM.so.18.1-rust-1.78.0-stable(_ZN4llvm33ModuleToPostOrderCGSCCPassAdaptor3runERNS_6ModuleERNS_15AnalysisManagerIS1_JEEE+0xa6d)[0x7f2985c6f3bf]
 3:11.89 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM.so.18.1-rust-1.78.0-stable(+0x5e6e94d)[0x7f2985c6e94d]
 3:11.90 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM.so.18.1-rust-1.78.0-stable(_ZN4llvm11PassManagerINS_6ModuleENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0xe1)[0x7f298604fd31]
 3:11.90 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM.so.18.1-rust-1.78.0-stable(_ZN4llvm24ModuleInlinerWrapperPass3runERNS_6ModuleERNS_15AnalysisManagerIS1_JEEE+0x19c)[0x7f29860518b8]
 3:11.90 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM.so.18.1-rust-1.78.0-stable(+0x6251717)[0x7f2986051717]
 3:11.90 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM.so.18.1-rust-1.78.0-stable(_ZN4llvm11PassManagerINS_6ModuleENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0xe1)[0x7f298604fd31]
 3:11.90 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-d6f66a8619a171d6.so(LLVMRustOptimize+0x822)[0x7f298c66c76e]
 3:11.91 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-d6f66a8619a171d6.so(+0x4c6a716)[0x7f298c66a716]
 3:11.91 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-d6f66a8619a171d6.so(_RNvXs1_CskFMTEvEfYcy_18rustc_codegen_llvmNtB5_18LlvmCodegenBackendNtNtNtCskzQGxkPzHAl_17rustc_codegen_ssa6traits5write19WriteBackendMethods8optimize+0xe3)[0x7f298c5c1823]
 3:11.91 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-d6f66a8619a171d6.so(+0x4bc64ca)[0x7f298c5c64ca]
 3:11.91 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-d6f66a8619a171d6.so(+0x4bc60a3)[0x7f298c5c60a3]
 3:11.91 /home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/../lib/libstd-d2ef02247056996e.so(rust_metadata_std_e4dfbc2c3f4b09f1+0xc1145)[0x7f298da26145]
 3:11.91 /lib/x86_64-linux-gnu/libc.so.6(+0x94ac3)[0x7f2987694ac3]
 3:11.91 /lib/x86_64-linux-gnu/libc.so.6(+0x126850)[0x7f2987726850]
 3:11.92 note: we would appreciate a report at https://github.com/rust-lang/rust
 3:11.92 note: backtrace dumped due to SIGSEGV! resuming signal
 3:12.21 error: could not compile `clang-sys` (lib)
 3:12.21 Caused by:
 3:12.23   process didn't exit successfully: `/home/drh/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc --crate-name clang_sys --edition=2015 /home/drh/src/mozilla-unified/third_party/rust/clang-sys/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=1 -C embed-bitcode=no --cfg 'feature="clang_3_5"' --cfg 'feature="clang_3_6"' --cfg 'feature="clang_3_7"' --cfg 'feature="clang_3_8"' --cfg 'feature="clang_3_9"' --cfg 'feature="clang_4_0"' --cfg 'feature="clang_5_0"' --cfg 'feature="clang_6_0"' --cfg 'feature="libloading"' --cfg 'feature="runtime"' -C metadata=68cfc46eaa0854ce -C extra-filename=-68cfc46eaa0854ce --out-dir /home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/release/deps -C linker=/home/drh/src/mozilla-unified/build/cargo-linker -L dependency=/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/release/deps --extern glob=/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/release/deps/libglob-34929b27c0b1c6c1.rmeta --extern libc=/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/release/deps/liblibc-ea0efabf2c48d215.rmeta --extern libloading=/home/drh/src/mozilla-unified/obj-x86_64-pc-linux-gnu/release/deps/liblibloading-81d964a2e49bf492.rmeta --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
 3:12.23 warning: build failed, waiting for other jobs to finish...
Endilll commented 3 weeks ago

Well, it makes sense to embed a release version of LLVM in a release version of Rust toolchain. If you see only Rust toolchain crashing when Clang 19.0 is used, it's an indicator that this is fixed in 19.0 and hasn't propagated to Rust toolchain yet.

donharter commented 3 weeks ago

I have made a report with mozilla. They may be using a buggy version of llvm in their build.