<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Le 23 nov. 2012 à 08:08, Alexey Samsonov <<a href="mailto:samsonov@google.com">samsonov@google.com</a>> a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><br><br><div class="gmail_quote">On Fri, Nov 23, 2012 at 4:14 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"><div class="im">On Tue, 20 Nov 2012 19:08:48 -0800, Richard Smith said:<br>
<br>
>Sorry, I don't know which Xcode versions correspond to which Clang<br>
>revisions.<br>
<br>
</div>Don't think anyone outside Apple does. :(<br>
<div class="im"><br>
>Clang has supported __int128 since r153999, which landed on<br>
>3rd April, and was included in the Clang 3.1 release.<br>
<br>
</div>The current Xcode (4.5.2) says:<br>
<br>
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)<br>
<br>
I fear it may discourage OS X users from playing with open source clang, when the only compiler they have to bootstrap it is the clang binary from Xcode, which apparently is too old. :(<br>
<div class="im"><br>
>> Anyway, now -fcatch-undefined-behavior works, yay!  Umm, I mean -<br>
>fsanitize=undefined. :)<br>
><br>
>I'm happy to hear it.<br>
<br>
</div>I spoke a bit soon... it certainly works way better than before, but I still get link errors building if I use the 'vptr' sanitizer with C++ code.  ex:<br></blockquote><div><br></div><div>Yes, I see the same problems with vptr sanitizer on Mac.</div>
<div>Richard, do you have an idea of how we can fix ubsan_type_hash.cc on Darwin, or should we</div><div>just disable vptr sanitizer (and exclude it from -fsanitize=undefined expansion) on darwin targets for now?</div><div>
 </div></div></div></blockquote><div><br></div><div>As I said previously, this issue is due to missing symbols in darwin's C++ libs. I don't think there is an easy way to fix this. Apple should update libc++abi and libc++ to fix this issue (the LLVM libc++abi library already does it, and a fix is already present in libc++ but is explicitly disabled: lib/libc++abi2.exp).</div><div><br></div><div>IMHO, the best option right now is to disable this sanitizer in the driver when targeting darwin (maybe emitting a warning if it is explicitly required using 'vptr' an not implicitly defined using 'undefined').</div><br><blockquote type="cite"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
Undefined symbols for architecture x86_64:<br>
</div>  "__ZTIN10__cxxabiv117__class_type_infoE", referenced from:<br>
      __ZN7__ubsan16checkDynamicTypeEPvS0_m in libclang_rt.ubsan_osx.a(ubsan_type_hash.cc.o)<br>
      __ZL21isDerivedFromAtOffsetPKN10__cxxabiv117__class_type_infoES2_l in libclang_rt.ubsan_osx.a(ubsan_type_hash.cc.o)<br>
  "__ZTIN10__cxxabiv120__si_class_type_infoE", referenced from:<br>
      __ZL21isDerivedFromAtOffsetPKN10__cxxabiv117__class_type_infoES2_l in libclang_rt.ubsan_osx.a(ubsan_type_hash.cc.o)<br>
  "__ZTIN10__cxxabiv121__vmi_class_type_infoE", referenced from:<br>
      __ZL21isDerivedFromAtOffsetPKN10__cxxabiv117__class_type_infoES2_l in libclang_rt.ubsan_osx.a(ubsan_type_hash.cc.o)<br>
<div class="HOEnZb"><div class="h5"><br>
Cheers,<br>
<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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div><br>
</div>
</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div>-- Jean-Daniel</div><div><br></div><div><br></div></span><br class="Apple-interchange-newline">

</div>
<br></body></html>