Degradation from rustc 1.71.0 -> 1.79.0 ("infinite space" compile error not recognized anymore)
Open
Nobody has claimed this yet.
A-inference
C-bug
I-crash
regression-from-stable-to-stable
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Behaviour in rust version 1.79.0 (the bug)
I found a program that does
- successfully finish
cargo check - but does never build (it takes up as much space as it can get, and then inevitably crash)
on rust version 1.79.0:
rustc 1.79.0 (129f3b996 2024-06-10)
binary: rustc
commit-hash: 129f3b9964af4d4a709d1383930ade12dfe7c081
commit-date: 2024-06-10
host: x86_64-unknown-linux-gnu
release: 1.79.0
LLVM version: 18.1.7
Behaviour in rust version 1.71.0 (before the degradation)
On rust version 1.71.0 this program failed the cargo check and build, which is the expected behaviour imo.
The minimum working example
use std::io::{self, BufRead};
fn main() -> Result<(), io::Error> {
let stdin = io::stdin(); // We get `Stdin` here.
let mut iterate_in = stdin.lock().lines();
// that's how to run a single request for a number alone in a line
let count = iterate_in.next().unwrap().unwrap().to_string().parse::<usize>().unwrap();
let mut rects = vec![];
for _ in 0..count {
let vecline = iterate_in.next()
.unwrap()
.unwrap()
.split_whitespace()
.map(|s| s.parse::<u32>().unwrap()-1)
.collect();
let el = (rects[0],rects[1],rects[2],rects[3]);
rects.push(el);
}
if let Some(solution) = rects.to_string() {
for s in solution {
println!("{} {}", s.0+1, s.1+1);
}
}
Ok(())
}
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 minimum working example in the issue and run it with rustc 1.71.0 and 1.79.0, comparing the diagnostics and resource use during cargo check and build. Trace the compiler behavior responsible for accepting the program in 1.79.0; done means the problematic program is rejected safely again with an appropriate diagnostic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100