[cfe-dev] Address Sanitizer and Objective-C garbage collection (GC) incompatible?
Chris Lattner
clattner at apple.com
Thu Dec 13 15:22:50 PST 2012
On Dec 13, 2012, at 2:58 PM, Sean McBride <sean at rogue-research.com> wrote:
> Has anyone tried asan with Obj-C GC?
>
> They seem incompatible. :( Even with a trivial example that just calls NSApplicationLoad() in main().
>
> The OS spews a bunch of these:
>
> a.out(8598,0x7fff7789c960) malloc: reference count underflow for 0x400410660, break on auto_refcount_underflow_error to debug.
> 2012-12-13 13:02:34.723 a.out[8598:707] storing a non-GC object 0x109733e48 in a GC collection, break on CFCollection_non_gc_storage_error to debug.
>
> then asan spews:
>
> ==8598== ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x00010aab4000
>
> I can file a bug with details, but thought I'd check here in case I'm not the first to try….
Hi Sean,
Are you aware that ObjC GC is deprecated in Mountain Lion?
-Chris
More information about the cfe-dev
mailing list