Skip to content

Commit ffd1450

Browse files
committed
Rollup merge of #32745 - Amanieu:arc_fix, r=alexcrichton
Fix infinite loop in Arc::downgrade
2 parents 684e2aa + af047d9 commit ffd1450

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
@@ -263,6 +263,7 @@ impl<T: ?Sized> Arc<T> {
263263
loop {
264264
// check if the weak counter is currently "locked"; if so, spin.
265265
if cur == usize::MAX {
266+
cur = this.inner().weak.load(Relaxed);
266267
continue;
267268
}
268269

0 commit comments

Comments
 (0)