Skip to content

Commit 96ab5a8

Browse files
committed
Rollup merge of rust-lang#32745 - Amanieu:arc_fix, r=alexcrichton
Fix infinite loop in Arc::downgrade
2 parents 5042ac2 + af047d9 commit 96ab5a8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/liballoc/arc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ impl<T: ?Sized> Arc<T> {
259259
loop {
260260
// check if the weak counter is currently "locked"; if so, spin.
261261
if cur == usize::MAX {
262+
cur = this.inner().weak.load(Relaxed);
262263
continue;
263264
}
264265

0 commit comments

Comments
 (0)