From 8e023f0063a666ee348fdced5364db1622474392 Mon Sep 17 00:00:00 2001 From: theraven Date: Mon, 18 Jun 2012 16:01:40 +0000 Subject: [PATCH] Fix case where more than 4 weak references to the same object would cause infinite loops. Patch by Thomas Davie! --- arc.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arc.m b/arc.m index 443d8af..b8c6d7c 100644 --- a/arc.m +++ b/arc.m @@ -519,6 +519,7 @@ id objc_storeWeak(id *addr, id obj) break; } } + oldRef = oldRef->next; } } if (nil == obj) @@ -569,6 +570,7 @@ id objc_storeWeak(id *addr, id obj) { break; } + ref = ref->next; } if (NULL != ref) {