• 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: Allocating too much memory kills my App rather than returning NULL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allocating too much memory kills my App rather than returning NULL


  • Subject: Re: Allocating too much memory kills my App rather than returning NULL
  • From: Greg Parker <email@hidden>
  • Date: Fri, 11 Nov 2011 17:25:47 -0800

On Nov 11, 2011, at 5:02 PM, Don Quixote de la Mancha wrote:
> My bug report suggested that Apple more-accurately simulate the memory
> available on physical devices by calling the setrlimit() system call
> just before entering main() in simulated Apps, but in all this time,
> Apple's only response has been a request that I attach a minimal test
> case to my report.
>
> Look man, it's not Rocket Science to write a loop that allocates a
> whole bunch of memory a whole bunch of times, then report to the user
> how many of those allocations actually succeeded.
>
> Rather than attach a minimal test case to my bug report, I got really
> really really pissed off at whatever Apple tools engineer who couldn't
> take time out from his Angry Birds sesssion to write a twenty-line
> test tool that would verify a bug whose fix would be just one line of
> code, which fix would prevent all of us iOS developers, as well as
> Apple's own iOS App developers, from shipping totally buggy products
> to end-users.

Did you actually write the minimal test you described? If you had, you would have discovered that setrlimit(RLIMIT_DATA) does not limit malloc memory.

That's one reason why we ask bug reports to include test cases.


> Earlier today I stumbled across a 100% repeatible Thumb-2 code
> generation bug in a completely different part of my program.  The bad
> machine code is precisely the same at all the available levels of
> optimization: -O0, -O1, -O2, -O3 and -O4.
>
> What is really bizarre is that the bad machine code is only generated
> for Release builds that are built with Apple's LLVM 3.0 compiler for
> physical iOS devices.
>
> Debug builds do not exhibit the bug at any optimization level.

armv6 or armv7? There's a known LLVM 3.0 codegen bug for armv6 Thumb. Workaround is to disable Thumb.


--
Greg Parker     email@hidden     Runtime Wrangler


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: Allocating too much memory kills my App rather than returning NULL
      • From: Don Quixote de la Mancha <email@hidden>
References: 
 >Allocating too much memory kills my App rather than returning NULL (From: Don Quixote de la Mancha <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Jens Alfke <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Don Quixote de la Mancha <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Greg Parker <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Wade Tregaskis <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Joar Wingfors <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Don Quixote de la Mancha <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Conrad Shultz <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Don Quixote de la Mancha <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Dave Camp <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: James Montgomerie <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Kyle Sluder <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Don Quixote de la Mancha <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Quincey Morris <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Don Quixote de la Mancha <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Graham Cox <email@hidden>)
 >Re: Allocating too much memory kills my App rather than returning NULL (From: Don Quixote de la Mancha <email@hidden>)

  • Prev by Date: Re: Allocating too much memory kills my App rather than returning NULL
  • Next by Date: Re: Allocating too much memory kills my App rather than returning NULL
  • Previous by thread: Re: Allocating too much memory kills my App rather than returning NULL
  • Next by thread: Re: Allocating too much memory kills my App rather than returning NULL
  • Index(es):
    • Date
    • Thread