carbon-lang
carbon-lang copied to clipboard
Infinite loop in `LookupQualifiedName`
Description of the bug:
Infinite loop found by fuzzer.
What did you do, or what's a simple way to reproduce the bug?
bazel run toolchain/driver:carbon compile test.carbon, where the contents of test.carbon are:
base class B {
}
base class R {
extend base: B;
}
base class B {
extend base: B;
var c: c32;
}
What did you expect to happen?
The compiler terminates in well under a second, probably with some sort of error.
What actually happened?
The compiler runs indefinitely (at least a minute).
Any other information, logs, or outputs that you want to share?
Initial debugging indicates that this is caused by an infinite loop in LookupQualifiedName, where scope.extended_scopes() consists of the ID of scope itself.