Skip to content

rustc unexpectedly overflowed its stack! this is a bug #136282

Open
@Julianzs

Description

I get this whenever compiling with the following lines in my Cargo.toml:

[profile.release]
lto = true

If I remove these lines, compilation works fine. Otherwise, I see the below. I'm happy to provide more information if helpful.

error: rustc interrupted by SIGSEGV, printing backtrace

/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/librustc_driver-3f4ebb066deec3c0.so(+0x32b0323)[0x7765dd0b0323]
/lib/x86_64-linux-gnu/libc.so.6(+0x42990)[0x7765d9a42990]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(+0x5c78e11)[0x7765d7e78e11]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm16computeKnownBitsEPKNS_5ValueERNS_9KnownBitsEjRKNS_13SimplifyQueryE+0xcb)[0x7765d7e7754b]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(+0x5c79291)[0x7765d7e79291]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm16computeKnownBitsEPKNS_5ValueERNS_9KnownBitsEjRKNS_13SimplifyQueryE+0xcb)[0x7765d7e7754b]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution23getConstantMultipleImplEPKNS_4SCEVE+0x25c)[0x7765d4a37f6c]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution11getRangeRefEPKNS_4SCEVENS0_13RangeSignHintEj+0x42a)[0x7765d85474ea]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution10getAddExprERNS_15SmallVectorImplIPKNS_4SCEVEEENS2_11NoWrapFlagsEj+0xc2d)[0x7765d8059a2d]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution10getGEPExprEPNS_11GEPOperatorERKNS_15SmallVectorImplIPKNS_4SCEVEEE+0x7da)[0x7765d803f36a]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution10createSCEVEPNS_5ValueE+0x4a2)[0x7765d803a222]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution14createSCEVIterEPNS_5ValueE+0x3bc)[0x7765d803883c]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution11getRangeRefEPKNS_4SCEVENS0_13RangeSignHintEj+0x208b)[0x7765d854914b]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution10getAddExprERNS_15SmallVectorImplIPKNS_4SCEVEEENS2_11NoWrapFlagsEj+0xc2d)[0x7765d8059a2d]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution10getGEPExprEPNS_11GEPOperatorERKNS_15SmallVectorImplIPKNS_4SCEVEEE+0x7da)[0x7765d803f36a]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution10createSCEVEPNS_5ValueE+0x4a2)[0x7765d803a222]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution14createSCEVIterEPNS_5ValueE+0x3bc)[0x7765d803883c]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution19createAddRecFromPHIEPNS_7PHINodeE+0x3d4)[0x7765d803c2d4]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution10createSCEVEPNS_5ValueE+0x4d0)[0x7765d803a250]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution14createSCEVIterEPNS_5ValueE+0x3bc)[0x7765d803883c]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution28computeExitLimitFromCondImplERNS0_14ExitLimitCacheEPKNS_4LoopEPNS_5ValueEbbb+0x26c)[0x7765d8124c6c]

### cycle encountered after 21 frames with period 24
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution25computeBackedgeTakenCountEPKNS_4LoopEb+0x7f8)[0x7765d8125ff8]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution11getRangeRefEPKNS_4SCEVENS0_13RangeSignHintEj+0x60e5)[0x7765d854d1a5]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution31isKnownViaNonRecursiveReasoningENS_7CmpInst9PredicateEPKNS_4SCEVES5_+0x114)[0x7765d837466e]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution13getMinMaxExprENS_9SCEVTypesERNS_15SmallVectorImplIPKNS_4SCEVEEE+0x383)[0x7765d804b0db]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution15applyLoopGuardsEPKNS_4SCEVEPKNS_4LoopE+0xf84)[0x7765d804d104]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution12howFarToZeroEPKNS_4SCEVEPKNS_4LoopEbb+0x46e)[0x7765d863dabe]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution24computeExitLimitFromICmpEPKNS_4LoopENS_7CmpInst9PredicateEPKNS_4SCEVES8_bb+0x3f9)[0x7765d8121dff]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution28computeExitLimitFromCondImplERNS0_14ExitLimitCacheEPKNS_4LoopEPNS_5ValueEbbb+0x39c)[0x7765d8124d9c]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution25computeBackedgeTakenCountEPKNS_4LoopEb+0x7f8)[0x7765d8125ff8]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution11getRangeRefEPKNS_4SCEVENS0_13RangeSignHintEj+0x60e5)[0x7765d854d1a5]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution31isKnownViaNonRecursiveReasoningENS_7CmpInst9PredicateEPKNS_4SCEVES5_+0x114)[0x7765d837466e]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution13getMinMaxExprENS_9SCEVTypesERNS_15SmallVectorImplIPKNS_4SCEVEEE+0x383)[0x7765d804b0db]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution15applyLoopGuardsEPKNS_4SCEVEPKNS_4LoopE+0xf84)[0x7765d804d104]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution12howFarToZeroEPKNS_4SCEVEPKNS_4LoopEbb+0x46e)[0x7765d863dabe]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution24computeExitLimitFromICmpEPKNS_4LoopENS_7CmpInst9PredicateEPKNS_4SCEVES8_bb+0x3f9)[0x7765d8121dff]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution28computeExitLimitFromCondImplERNS0_14ExitLimitCacheEPKNS_4LoopEPNS_5ValueEbbb+0x39c)[0x7765d8124d9c]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution25computeBackedgeTakenCountEPKNS_4LoopEb+0x7f8)[0x7765d8125ff8]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution11getRangeRefEPKNS_4SCEVENS0_13RangeSignHintEj+0x60e5)[0x7765d854d1a5]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution31isKnownViaNonRecursiveReasoningENS_7CmpInst9PredicateEPKNS_4SCEVES5_+0x114)[0x7765d837466e]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution13getMinMaxExprENS_9SCEVTypesERNS_15SmallVectorImplIPKNS_4SCEVEEE+0x383)[0x7765d804b0db]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution15applyLoopGuardsEPKNS_4SCEVEPKNS_4LoopE+0xf84)[0x7765d804d104]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution12howFarToZeroEPKNS_4SCEVEPKNS_4LoopEbb+0x46e)[0x7765d863dabe]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution24computeExitLimitFromICmpEPKNS_4LoopENS_7CmpInst9PredicateEPKNS_4SCEVES8_bb+0x3f9)[0x7765d8121dff]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution28computeExitLimitFromCondImplERNS0_14ExitLimitCacheEPKNS_4LoopEPNS_5ValueEbbb+0x39c)[0x7765d8124d9c]
### recursed 9 times

/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution25computeBackedgeTakenCountEPKNS_4LoopEb+0x7f8)[0x7765d8125ff8]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution11getRangeRefEPKNS_4SCEVENS0_13RangeSignHintEj+0x60e5)[0x7765d854d1a5]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution31isKnownViaNonRecursiveReasoningENS_7CmpInst9PredicateEPKNS_4SCEVES5_+0x114)[0x7765d837466e]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution13getMinMaxExprENS_9SCEVTypesERNS_15SmallVectorImplIPKNS_4SCEVEEE+0x383)[0x7765d804b0db]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution15applyLoopGuardsEPKNS_4SCEVEPKNS_4LoopE+0xf84)[0x7765d804d104]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution12howFarToZeroEPKNS_4SCEVEPKNS_4LoopEbb+0x46e)[0x7765d863dabe]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution24computeExitLimitFromICmpEPKNS_4LoopENS_7CmpInst9PredicateEPKNS_4SCEVES8_bb+0x3f9)[0x7765d8121dff]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution28computeExitLimitFromCondImplERNS0_14ExitLimitCacheEPKNS_4LoopEPNS_5ValueEbbb+0x39c)[0x7765d8124d9c]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution25computeBackedgeTakenCountEPKNS_4LoopEb+0x7f8)[0x7765d8125ff8]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution11getRangeRefEPKNS_4SCEVENS0_13RangeSignHintEj+0x60e5)[0x7765d854d1a5]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution31isKnownViaNonRecursiveReasoningENS_7CmpInst9PredicateEPKNS_4SCEVES5_+0x114)[0x7765d837466e]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution13getMinMaxExprENS_9SCEVTypesERNS_15SmallVectorImplIPKNS_4SCEVEEE+0x383)[0x7765d804b0db]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution15applyLoopGuardsEPKNS_4SCEVEPKNS_4LoopE+0xf84)[0x7765d804d104]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution12howFarToZeroEPKNS_4SCEVEPKNS_4LoopEbb+0x46e)[0x7765d863dabe]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution24computeExitLimitFromICmpEPKNS_4LoopENS_7CmpInst9PredicateEPKNS_4SCEVES8_bb+0x3f9)[0x7765d8121dff]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution28computeExitLimitFromCondImplERNS0_14ExitLimitCacheEPKNS_4LoopEPNS_5ValueEbbb+0x39c)[0x7765d8124d9c]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution25computeBackedgeTakenCountEPKNS_4LoopEb+0x7f8)[0x7765d8125ff8]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution11getRangeRefEPKNS_4SCEVENS0_13RangeSignHintEj+0x60e5)[0x7765d854d1a5]
/home/sol/.rustup/toolchains/1.81.0-x86_64-unknown-linux-gnu/lib/libLLVM.so.18.1-rust-1.81.0-stable(_ZN4llvm15ScalarEvolution31isKnownViaNonRecursiveReasoningENS_7CmpInst9PredicateEPKNS_4SCEVES5_+0x114)[0x7765d837466e]

note: rustc unexpectedly overflowed its stack! this is a bug
note: maximum backtrace depth reached, frames may have been lost
note: we would appreciate a report at https://github.com/rust-lang/rust
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
note: backtrace dumped due to SIGSEGV! resuming signal
error: could not compile `agave-validator` (bin "agave-validator")

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.S-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions