- Notifications
You must be signed in to change notification settings - Fork 14.1k
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️PG-exploit-mitigationsProject group: Exploit mitigationsProject group: Exploit mitigationsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
fn main() { println!("Hello, world!"); }Meta
rustc --version --verbose:
rustc 1.58.0-nightly (db062de72 2021-11-01) binary: rustc commit-hash: db062de72b0a064f45b6f86894cbdc7c0ec68844 commit-date: 2021-11-01 host: x86_64-unknown-linux-gnu release: 1.58.0-nightly LLVM version: 13.0.0 Error output
~/hello-rust$ RUSTFLAGS="-Cembed-bitcode -Clto -Zsanitizer=cfi" RUSTDOCFLAGS="-Cembed-bitcode -Clto -Zsanitizer=cfi" cargo run -Zbuild-std --target x86_64-unknown-linux-gnu
Updating crates.io index Downloaded addr2line v0.16.0 Downloaded cc v1.0.69 Downloaded cfg-if v0.1.10 Downloaded unicode-width v0.1.8 Downloaded adler v0.2.3 Downloaded compiler_builtins v0.1.49 Downloaded getopts v0.2.21 Downloaded rustc-demangle v0.1.21 Downloaded hashbrown v0.11.0 Downloaded miniz_oxide v0.4.0 Downloaded object v0.26.2 Downloaded memchr v2.4.1 Downloaded libc v0.2.103 Downloaded gimli v0.25.0 Downloaded 14 crates (2.0 MB) in 0.68s Compiling compiler_builtins v0.1.49 Compiling core v0.0.0 (/home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core) Compiling libc v0.2.103 Compiling cc v1.0.69 Compiling memchr v2.4.1 Compiling std v0.0.0 (/home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std) Compiling unwind v0.0.0 (/home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/unwind) Compiling rustc-std-workspace-core v1.99.0 (/home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core) /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x4c9083)[0x7fb24e347083] /lib/x86_64-linux-gnu/libpthread.so.0(+0x138e0)[0x7fb24dae68e0] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(+0x3520633)[0x7fb24c11b633] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(+0x351a701)[0x7fb24c115701] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(+0x275552f)[0x7fb24b35052f] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(+0x274d4b4)[0x7fb24b3484b4] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm12SelectionDAG13LegalizeTypesEv+0x33c)[0x7fb24b3422bc] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm16SelectionDAGISel17CodeGenAndEmitDAGEv+0x80)[0x7fb24b340610] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm16SelectionDAGISel20SelectAllBasicBlocksERKNS_8FunctionE+0x271c)[0x7fb24b32477c] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm16SelectionDAGISel20runOnMachineFunctionERNS_15MachineFunctionE+0x4f2)[0x7fb24b31c3e2] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(+0x2720ed8)[0x7fb24b31bed8] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0xaa)[0x7fb24b8f6e1a] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x6c7)[0x7fb24b7adf27] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x2f)[0x7fb24b7ad83f] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x289)[0x7fb24bb91219] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x23f5004)[0x7fb250273004] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x23efd5f)[0x7fb25026dd5f] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x23f2960)[0x7fb250270960] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x238526b)[0x7fb25020326b] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x237f8ab)[0x7fb2501fd8ab] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x23c469c)[0x7fb25024269c] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x23d899c)[0x7fb25025699c] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/libstd-8adcca4f1427867b.so(rust_metadata_std_fcea40badc263c8f+0xa9513)[0x7fb24dbb8513] /lib/x86_64-linux-gnu/libpthread.so.0(+0x8eae)[0x7fb24dadbeae] /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7fb24d9f8a5f] error: could not compile `core` Caused by: process didn't exit successfully: `rustc --crate-name core --edition=2018 /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=46c7ed8bd3462e72 -C extra-filename=-46c7ed8bd3462e72 --out-dir /home/rcvalle/hello-rust/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -Z force-unstable-if-unmarked -L dependency=/home/rcvalle/hello-rust/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/home/rcvalle/hello-rust/target/debug/deps --cap-lints allow -Cembed-bitcode -Clto -Zsanitizer=cfi` (signal: 11, SIGSEGV: invalid memory reference) warning: build failed, waiting for other jobs to finish... error: build failed Backtrace
RUSTFLAGS="-Cembed-bitcode -Clto -Zsanitizer=cfi" RUSTDOCFLAGS="-Cembed-bitcode -Clto -Zsanitizer=cfi" RUST_BACKTRACE="1" cargo run -Zbuild-std --target x86_64-unknown-linux-gnu
Compiling core v0.0.0 (/home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core) Compiling rustc-std-workspace-core v1.99.0 (/home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/rustc-std-workspace-core) Compiling compiler_builtins v0.1.49 Compiling libc v0.2.103 /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x4c9083)[0x7fa21a33b083] /lib/x86_64-linux-gnu/libpthread.so.0(+0x138e0)[0x7fa219ada8e0] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(+0x3520633)[0x7fa21810f633] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(+0x351a701)[0x7fa218109701] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(+0x275552f)[0x7fa21734452f] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(+0x274d4b4)[0x7fa21733c4b4] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm12SelectionDAG13LegalizeTypesEv+0x33c)[0x7fa2173362bc] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm16SelectionDAGISel17CodeGenAndEmitDAGEv+0x80)[0x7fa217334610] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm16SelectionDAGISel20SelectAllBasicBlocksERKNS_8FunctionE+0x271c)[0x7fa21731877c] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm16SelectionDAGISel20runOnMachineFunctionERNS_15MachineFunctionE+0x4f2)[0x7fa2173103e2] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(+0x2720ed8)[0x7fa21730fed8] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0xaa)[0x7fa2178eae1a] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x6c7)[0x7fa2177a1f27] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x2f)[0x7fa2177a183f] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/../lib/libLLVM-13-rust-1.58.0-nightly.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x289)[0x7fa217b85219] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x23f5004)[0x7fa21c267004] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x23efd5f)[0x7fa21c261d5f] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x23f2960)[0x7fa21c264960] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x238526b)[0x7fa21c1f726b] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x237f8ab)[0x7fa21c1f18ab] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x23c469c)[0x7fa21c23669c] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/librustc_driver-5edcf0e336ae6d33.so(+0x23d899c)[0x7fa21c24a99c] /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/../lib/libstd-8adcca4f1427867b.so(rust_metadata_std_fcea40badc263c8f+0xa9513)[0x7fa219bac513] /lib/x86_64-linux-gnu/libpthread.so.0(+0x8eae)[0x7fa219acfeae] /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7fa2199eca5f] error: could not compile `core` Caused by: process didn't exit successfully: `rustc --crate-name core --edition=2018 /home/rcvalle/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=46c7ed8bd3462e72 -C extra-filename=-46c7ed8bd3462e72 --out-dir /home/rcvalle/hello-rust/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -Z force-unstable-if-unmarked -L dependency=/home/rcvalle/hello-rust/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/home/rcvalle/hello-rust/target/debug/deps --cap-lints allow -Cembed-bitcode -Clto -Zsanitizer=cfi` (signal: 11, SIGSEGV: invalid memory reference) warning: build failed, waiting for other jobs to finish... error: build failed schneiderfelipe
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️PG-exploit-mitigationsProject group: Exploit mitigationsProject group: Exploit mitigationsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.