Open donharter opened 3 weeks ago
@llvm/issue-subscribers-backend-x86
Author: None (donharter)
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.
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...
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.
I have made a report with mozilla. They may be using a buggy version of llvm in their build.
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