diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-04-07 17:17:10 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-04-07 20:22:42 +0530 |
| commit | ffd1450c277659be81ef5fc769af3e5c6107b7ee (patch) | |
| tree | 35c0cf9dbd5663e149e4e05c6be1d46c4b15aee1 /src/liballoc | |
| parent | 684e2aace5670efd1df8c578baeefa7739cd2be1 (diff) | |
| parent | af047d9c10be73ca9f450b2e3aa2c5c62483981c (diff) | |
| download | rust-ffd1450c277659be81ef5fc769af3e5c6107b7ee.tar.gz rust-ffd1450c277659be81ef5fc769af3e5c6107b7ee.zip | |
Rollup merge of #32745 - Amanieu:arc_fix, r=alexcrichton
Fix infinite loop in Arc::downgrade
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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<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; } |
