From af047d9c10be73ca9f450b2e3aa2c5c62483981c Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Tue, 5 Apr 2016 14:00:17 +0100 Subject: [PATCH] Fix infinite loop in Arc::downgrade --- src/liballoc/arc.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 055029dddcd..e1f698cb484 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -263,6 +263,7 @@ impl Arc { loop { // check if the weak counter is currently "locked"; if so, spin. if cur == usize::MAX { + cur = this.inner().weak.load(Relaxed); continue; }