Skip to content

cyclic trait inheritance leads to a rustc stack overflow #12511

Closed
@nrc

Description

@nrc
trait t1 : t2 {
}
trait t2 : t1 {
}

or even

trait t : t {
}

gives a stack overflow:

task 'rustc' has overflowed its stack
./build.sh: line 1: 22351 Illegal instruction (core dumped) /home/nick/rust2/x86_64-unknown-linux-gnu/stage1/bin/rustc $1.rs -o $1

Metadata

Metadata

Assignees

Labels

A-trait-systemArea: Trait systemE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions