Skip to content

Commit

Permalink
Rollup merge of rust-lang#32745 - Amanieu:arc_fix, r=alexcrichton
Browse files Browse the repository at this point in the history
Fix infinite loop in Arc::downgrade
  • Loading branch information
Manishearth committed Apr 7, 2016
2 parents 3a2fe77 + af047d9 commit 27229fd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ impl<T: ?Sized> Arc<T> {
loop {
// check if the weak counter is currently "locked"; if so, spin.
if cur == usize::MAX {
cur = this.inner().weak.load(Relaxed);
continue;
}

Expand Down

0 comments on commit 27229fd

Please sign in to comment.