[cfe-dev] Address Sanitizer and Objective-C garbage collection (GC) incompatible?

Sean McBride sean at rogue-research.com
Thu Dec 13 14:58:25 PST 2012


Hi all,

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....

Thanks,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada






More information about the cfe-dev mailing list