-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.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.P-mediumMedium priorityMedium priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
The following crashes with an illegal instruction when compiled in release mode with 1.13.0-nightly (499484f56 2016-08-18)
on i686-unknown-linux-gnu
:
fn main() {
let (tx, _) = std::sync::mpsc::channel::<()>();
for _ in 0..std::usize::MAX {
std::mem::forget(tx.clone());
}
}
It's presumably the result of the unchecked addition in std::sync::mpsc::shared::Packet::clone_chan
. Another unchecked addition is performed in std::sync::mpsc::sync::Packet::clone_chan
, and other uses of fetch_add
in the mpsc
module should probably be audited as well.
Metadata
Metadata
Assignees
Labels
E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.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.P-mediumMedium priorityMedium priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.