GCCRS fails to handle deeply nested Option types and gets killed by SIGKILL instead of emitting proper trait error
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 231
- Avg merge
- 19h 55m
- Merged PRs (30d)
- 67
Description
Summary
When compiling the attached Rust code with GCCRS, the compiler gets terminated with SIGKILL due to processing time exceeded, while rustc correctly reports the missing Display trait implementation. This indicates a defect in GCCRS's handling of deeply nested types and trait checking.
Reproducer
I tried this code:
pub fn foo() -> impl std::fmt::Display {
Some(Some(Some(/* ... 39 layers of Some nesting ... */)))
}
fn main() {}
Does the code make use of any (1.49) nightly feature ?
- Nightly
Godbolt link
https://godbolt.org/z/n6f1WoeWb
Actual behavior
Compiler process gets killed:
Killed - processing time exceeded
Program terminated with signal: SIGKILL
Expected behavior
The compiler should emit a proper trait implementation error.
GCC Version
14.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the 39-layer nested Option reproducer from the issue and compare GCCRS with rustc using the linked Godbolt example. Trace the trait-checking path involved in processing the nested types; done means GCCRS emits a proper missing Display trait error instead of being killed by SIGKILL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100