-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.O-AVRTarget: AVR processors (ATtiny, ATmega, etc.)Target: AVR processors (ATtiny, ATmega, etc.)T-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.llvm-fixed-upstreamIssue expected to be fixed by the next major LLVM upgrade, or backported fixesIssue expected to be fixed by the next major LLVM upgrade, or backported fixes
Description
On this linked repository, running cargo build --release fails with a segmentation fault:
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/librustc_driver-e0c8ab3d159f8c4e.so(+0x328ffe3)[0x7fe530e8ffe3]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7fe52d842520]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.67.0-nightly.so(+0x5736edf)[0x7fe52c136edf]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.67.0-nightly.so(+0x573570a)[0x7fe52c13570a]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.67.0-nightly.so(+0x57347c4)[0x7fe52c1347c4]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.67.0-nightly.so(+0x56d9481)[0x7fe52c0d9481]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.67.0-nightly.so(_ZN4llvm12RegAllocBase16allocatePhysRegsEv+0x14c)[0x7fe52c13020c]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.67.0-nightly.so(+0x5797f30)[0x7fe52c197f30]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.67.0-nightly.so(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0xb11)[0x7fe52c387461]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.67.0-nightly.so(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x2f)[0x7fe52c38692f]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.67.0-nightly.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x210)[0x7fe52c20b29e]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/librustc_driver-e0c8ab3d159f8c4e.so(+0x2757582)[0x7fe530357582]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/librustc_driver-e0c8ab3d159f8c4e.so(+0x2756f45)[0x7fe530356f45]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/librustc_driver-e0c8ab3d159f8c4e.so(+0x2754e97)[0x7fe530354e97]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/librustc_driver-e0c8ab3d159f8c4e.so(+0x2785f9d)[0x7fe530385f9d]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/librustc_driver-e0c8ab3d159f8c4e.so(+0x2784ecc)[0x7fe530384ecc]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/librustc_driver-e0c8ab3d159f8c4e.so(+0x2783d2e)[0x7fe530383d2e]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/librustc_driver-e0c8ab3d159f8c4e.so(+0x26898f4)[0x7fe5302898f4]
/home/cactus/sdk/rust/rustup/toolchains/nightly-2022-12-09-x86_64-unknown-linux-gnu/lib/librustc_driver-e0c8ab3d159f8c4e.so(+0x4045b33)[0x7fe531c45b33]
/lib/x86_64-linux-gnu/libc.so.6(+0x94b43)[0x7fe52d894b43]
/lib/x86_64-linux-gnu/libc.so.6(+0x126a00)[0x7fe52d926a00]
warning: `worduino-avr` (bin "worduino-avr") generated 2 warnings (run `cargo fix --bin "worduino-avr"` to apply 2 suggestions)
error: could not compile `worduino-avr`; 2 warnings emitted
Caused by:
process didn't exit successfully: `rustc --crate-name worduino_avr src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C metadata=6d6db11dfacad857 -C extra-filename=-6d6db11dfacad857 --out-dir /home/cactus/prog/rust/avr/bugs/segfault/target/avr-atmega32u4/release/deps --target /home/cactus/prog/rust/avr/bugs/segfault/avr-atmega32u4.json -L dependency=/home/cactus/prog/rust/avr/bugs/segfault/target/avr-atmega32u4/release/deps -L dependency=/home/cactus/prog/rust/avr/bugs/segfault/target/release/deps --extern avr_config=/home/cactus/prog/rust/avr/bugs/segfault/target/avr-atmega32u4/release/deps/libavr_config-8902202b8ad51356.rlib --extern avr_std_stub=/home/cactus/prog/rust/avr/bugs/segfault/target/avr-atmega32u4/release/deps/libavr_std_stub-c3510b4296c6559e.rlib --extern 'noprelude:compiler_builtins=/home/cactus/prog/rust/avr/bugs/segfault/target/avr-atmega32u4/release/deps/libcompiler_builtins-d2b51c47ad38c941.rlib' --extern 'noprelude:core=/home/cactus/prog/rust/avr/bugs/segfault/target/avr-atmega32u4/release/deps/libcore-195cf775332e0617.rlib' --extern worduino_engine=/home/cactus/prog/rust/avr/bugs/segfault/target/avr-atmega32u4/release/deps/libworduino_engine-a6a2c489fed3cc79.rlib -Z unstable-options --emit=llvm-bc` (signal: 11, SIGSEGV: invalid memory reference)
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.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.O-AVRTarget: AVR processors (ATtiny, ATmega, etc.)Target: AVR processors (ATtiny, ATmega, etc.)T-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.llvm-fixed-upstreamIssue expected to be fixed by the next major LLVM upgrade, or backported fixesIssue expected to be fixed by the next major LLVM upgrade, or backported fixes