-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.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.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.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.
Description
I tried this code from tests/ui/dropck/dropck_no_diverge_on_nonregular_2.rs
// Issue 22443: Reject code using non-regular types that would
// otherwise cause dropck to loop infinitely.
use std::marker::PhantomData;
struct Digit<T> {
elem: T
}
struct Node<T:'static> { m: PhantomData<&'static T> }
enum FingerTree<T:'static> {
Single(T),
// Bug report said Digit after Box would stack overflow (versus
// Digit before Box; see dropck_no_diverge_on_nonregular_2).
Deep(
Box<FingerTree<Node<T>>>,
Digit<T>,
)
}
fn main() {
let ft = //~ ERROR overflow while adding drop-check rules for FingerTree
FingerTree::Single(1);
//~^ ERROR overflow while adding drop-check rules for FingerTree
}
Instead, this happened: explanation
thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow
[1] 4101068 IOT instruction (core dumped) ~/.rustup/toolchains/master/bin/rustdoc
Meta
rustdoc --version --verbose
:
rustdoc 1.63.0-nightly (d40f24e95 2022-06-16)
binary: rustdoc
commit-hash: d40f24e956a698e47a209541031c4045acc5a684
commit-date: 2022-06-16
host: x86_64-unknown-linux-gnu
release: 1.63.0-nightly
LLVM version: 14.0.5
The recursion seems to happem somewhere here:
Backtrace
#85 0x00007ffff5e77f64 in rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::combine::Generalizer> () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#86 0x00007ffff5ea1300 in <rustc_infer::infer::combine::Generalizer as rustc_middle::ty::relate::TypeRelation>::tys () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#87 0x00007ffff5e77f64 in rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::combine::Generalizer> () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#88 0x00007ffff5ea1300 in <rustc_infer::infer::combine::Generalizer as rustc_middle::ty::relate::TypeRelation>::tys () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#89 0x00007ffff5e77f64 in rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::combine::Generalizer> () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#90 0x00007ffff5ea1300 in <rustc_infer::infer::combine::Generalizer as rustc_middle::ty::relate::TypeRelation>::tys () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#91 0x00007ffff5e77f64 in rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::combine::Generalizer> () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#92 0x00007ffff5ea1300 in <rustc_infer::infer::combine::Generalizer as rustc_middle::ty::relate::TypeRelation>::tys () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#93 0x00007ffff5e77f64 in rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::combine::Generalizer> () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#94 0x00007ffff5ea1300 in <rustc_infer::infer::combine::Generalizer as rustc_middle::ty::relate::TypeRelation>::tys () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#95 0x00007ffff5e77f64 in rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::combine::Generalizer> () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#96 0x00007ffff5ea1300 in <rustc_infer::infer::combine::Generalizer as rustc_middle::ty::relate::TypeRelation>::tys () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#97 0x00007ffff5e77f64 in rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::combine::Generalizer> () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#98 0x00007ffff5ea1300 in <rustc_infer::infer::combine::Generalizer as rustc_middle::ty::relate::TypeRelation>::tys () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#99 0x00007ffff5e77f64 in rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::combine::Generalizer> () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#100 0x00007ffff5ea1300 in <rustc_infer::infer::combine::Generalizer as rustc_middle::ty::relate::TypeRelation>::tys () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#101 0x00007ffff5e77f64 in rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::combine::Generalizer> () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#102 0x00007ffff5ea1300 in <rustc_infer::infer::combine::Generalizer as rustc_middle::ty::relate::TypeRelation>::tys () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#103 0x00007ffff5e77f64 in rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::combine::Generalizer> () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#104 0x00007ffff5ea1300 in <rustc_infer::infer::combine::Generalizer as rustc_middle::ty::relate::TypeRelation>::tys () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
#105 0x00007ffff5e77f64 in rustc_middle::ty::relate::super_relate_tys::<rustc_infer::infer::combine::Generalizer> () from /home/matthias/.rustup/toolchains/master/bin/../lib/librustc_driver-e1f5a2a7d671876e.so
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.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.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.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.