Re: Allocating too much memory kills my App rather than returning NULL
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