Re: alloc init thread safe?
Re: alloc init thread safe?
- Subject: Re: alloc init thread safe?
- From: David Carlisle <email@hidden>
- Date: Thu, 8 Mar 2007 12:46:11 -0700
Thanks for the list of suggestions.
I've confirmed that when the BOOL method returns a NO, the object
receiving the method call is being allocated correctly just before
the call. It fails about 15% of the time. The original alloc init
bug has not failed since I put locks around it, but that doesn't
explain the problem.
I'll work through your list, probably starting with changing the
optimization level if that has a chance of flagging an error.
On Mar 8, 2007, at 12:34 PM, Bill Bumgarner wrote:
On Mar 8, 2007, at 11:09 AM, David Carlisle wrote:
if I have an C2_alloc_init method randomly returning a null, and
another method randomly returning a NO, that seems to be the same
problem, if NO == null.
Right -- I asked about warnings because seemingly random return
values are often the result of ignoring warnings. Go for the
obvious / simple solution first, even if unlikely, then dive deeper.
Everything works as expected with threading disabled? Zerolink is
off (it can be a bear at times)? Any behavior change between
deployment and debug builds? Changing the optimization level show
anything new (the compiler can do additional safety checks w/
optimization enabled)?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden