<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt">Hi Sean, <br><div><br><div class="gmail_quote">On Fri, Dec 14, 2012 at 2:58 AM, Sean McBride <span dir="ltr"><<a href="mailto:sean@rogue-research.com" target="_blank">sean@rogue-research.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
Has anyone tried asan with Obj-C GC?<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
They seem incompatible. :(  Even with a trivial example that just calls NSApplicationLoad() in main().<br></blockquote><div><br></div><div>This is very likely. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
The OS spews a bunch of these:<br>
<br>
a.out(8598,0x7fff7789c960) malloc: reference count underflow for 0x400410660, break on auto_refcount_underflow_error to debug.<br>
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.<br>
<br>
then asan spews:<br>
<br>
==8598== ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x00010aab4000<br></blockquote><div><br></div><div>This happens if an address allocated by some part of ObjC run-time is passed to the regular C free (or C++ delete).</div>
<div>It *may* be possible to fix this by intercepting the relevant part of ObjC run-time in asan library. </div><div>I suggest to wait until asan transitions from mach_override to "function interposition" (soon!) and then give it a try. </div>
Since none of us (asan team) is an ObjC expert and ObjC GC is deprecated we are unlikely to handle the problem ourselves.</div><div class="gmail_quote"><br></div><div class="gmail_quote">--kcc <br>  <div><br></div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I can file a bug with details, but thought I'd check here in case I'm not the first to try....<br>
<br>
Thanks,<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
____________________________________________________________<br>
Sean McBride, B. Eng                 <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
Rogue Research                        <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
Mac Software Developer              Montréal, Québec, Canada<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</font></span></blockquote></div><br></div></div>