cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: IOS Crash

From: Nick Zitzmann <nick_at_chronosnet.com>
Date: Wed, 20 Mar 2013 12:02:58 -0600

On Mar 20, 2013, at 10:24 AM, David Sullivan (2K) <David.Sullivan_at_2k.com> wrote:

> When we INSTRUMENT our build for profiling on IOS, we get an EXC_BAD_ACCESS from functions being called inside cURL. Has anyone else seen this issue?
>
> Nick?

I haven't. But if you look at the stack trace:

> Thread 17 Crashed:
> 0 libremoteoainject.dylib 0x00a80614 _OARecordFinalEvent + 20
> 1 libremoteoainject.dylib 0x00a80d82 _OARecordAllocationEvent + 38
> 2 CoreFoundation 0x313d9e92 _CFRetain + 274

…you can see that curl's call to SecTrustGetCertificateCount() is causing a CFRetain() while compiling something internally, which gets the Object Allocations instrument to record the retain, but it's crashing recording the retain. So that seems like an Instruments problem to me. In case you're wondering, we call that function to get the number of certificates in the chain the server sent to the client.

Did you turn on zombie mode in the instrument? Turning that on causes memory to never be freed once allocated, and since iOS runs on a 32-bit CPU, once your app hits the 4 GB per-process RAM limit, it will crash. It looks like you do have retain/release counting turned on, and that's usually enabled along with zombie mode…

Nick Zitzmann
<http://www.chronosnet.com/>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-03-20