• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: alloc init thread safe?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: alloc init thread safe?
      • From: email@hidden
References: 
 >alloc init thread safe? (From: email@hidden)
 >Re: alloc init thread safe? (From: Chris Suter <email@hidden>)
 >Re: alloc init thread safe? (From: David Carlisle <email@hidden>)
 >Re: alloc init thread safe? (From: "Shawn Erickson" <email@hidden>)
 >Re: alloc init thread safe? (From: David Carlisle <email@hidden>)
 >Re: alloc init thread safe? (From: Bill Bumgarner <email@hidden>)
 >Re: alloc init thread safe? (From: David Carlisle <email@hidden>)
 >Re: alloc init thread safe? (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: alloc init thread safe?
  • Next by Date: Re: alloc init thread safe?
  • Previous by thread: Re: alloc init thread safe?
  • Next by thread: Re: alloc init thread safe?
  • Index(es):
    • Date
    • Thread