-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-inferenceArea: Type inferenceArea: Type inferenceC-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.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
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(())
}
Metadata
Metadata
Assignees
Labels
A-inferenceArea: Type inferenceArea: Type inferenceC-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.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.