Skip to content

ice: coroutine: attempted to add with overflow #118951

Open
@matthiaskrgr

Description

@matthiaskrgr

auto-reduced (treereduce-rust):

async fn empty() {}

async fn meow(a: [u8; 0xffff_ffff_ffff_ffff]) {
    empty().await;
    dbg!(a);
}

original:

async fn empty() {}

async fn meow(a: [u8; 0xffff_ffff_ffff_ffff]) {
	empty().await;
	dbg!(a);
}

fn main() {
	let v = meow([0, 4, 1, 5]);
	let e = [0u8; 202];
	let _ = || unsafe {
		use std::{mem, ptr};
		let mut copy = bar::read(&v);
		ptr::write(&mut copy, mem::transmute(ptr::read(&e)));
		mem::forget(copy);
	};
}

Version information

rustc 1.76.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.76.0-dev
LLVM version: 17.0.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some way

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions