Skip to content

Commit 27229fd

Browse files
committed
Rollup merge of #32745 - Amanieu:arc_fix, r=alexcrichton
Fix infinite loop in Arc::downgrade
2 parents 3a2fe77 + af047d9 commit 27229fd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/liballoc/arc.rs

+1
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)