Hi folks,
I was chasing a sporadic (very seldom) crash which we noticed on
production instances. The version of the libraries we are using is
ancient. But the issue may still exist.
in NSAutoreleasePool -emptyPool there is this comment:
/* If there are NSAutoreleasePool below us in the stack of
NSAutoreleasePools, then deallocate them also. The (only) way
we
could get in this situation (in correctly written programs,
that
don't release NSAutoreleasePools in weird ways), is if an
exception threw us up the stack. */
while (_child != nil)
{
[_child dealloc];
}
well... we may have an incorrectly written program here and we may not
catch alle exceptions properly but I currently cannot tell for sure.
But whether correct or not, I believe the _child ivar should be cleared
after the dealloc since release pools get recycled.
This is an RFA (Request for Approval) to apply this patch.
Cheers,
David
--
David Ayers - Team Austria
Free Software Foundation Europe (FSFE) [] (http://www.fsfe.org)
Join the Fellowship of FSFE! [][][] (https://fsfe.org/join)
Your donation powers our work! || (http://fsfe.org/donate)
Index: Source/NSAutoreleasePool.m
===================================================================
--- Source/NSAutoreleasePool.m (Revision 32695)
+++ Source/NSAutoreleasePool.m (Arbeitskopie)
@@ -509,6 +509,7 @@
while (_child != nil)
{
[_child dealloc];
+ _child = nil;
}
/* Take the object out of the released list just before releasing it,
Index: ChangeLog
===================================================================
--- ChangeLog (Revision 32695)
+++ ChangeLog (Arbeitskopie)
@@ -1,3 +1,8 @@
+2011-03-24 David Ayers <[email protected]>
+
+ * Source/NSAutoreleasePool.m (-emptyPool): Clear _child instance
+ variable.
+
2011-03-23 Fred Kiefer <[email protected]>
* Source/NSNumberFormatter.m (-stringForObjectValue:): Swapped a
_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep