<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><br><br><div class="gmail_quote">On Wed, Oct 31, 2012 at 12:38 AM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">This LGTM for the short term, but I'd like someone with more<br>
familiarity with the sanitizer_common pieces to look over it too (see<br>attached ubsan.patch).<br><br><br>Slightly longer-term, we should move away from using fprintf and over<br>to sanitizer_common's Printf implementation. There are four format<br>
specifiers which ubsan uses which Printf doesn't yet provide:<br><br> %08x<br> %lld<br> %llu<br> %Lg<br><br>The attached patch implements the first three and ports ubsan over to<br>using sanitizer_common's Printf. Two more things need doing before we<br>
can switch to this:<br><br> 1) Implement Printf support for formatting of long double<br> 2) Move the 'isatty' check into sanitizer_common, so it can do the<br>right platform-specific magic and can respect calls to<br>
__sanitizer_set_report_path<br></blockquote><div><br></div><div>I've moved unit test for Printf to sanitizer_common/tests/</div><div>and added PrintsToTty() function which respects current report file to sanitizer_common.h</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>Once those are done, ubsan won't need to include any system headers<br>
any more. Seem reasonable?<br></blockquote><div><br></div><div>Sure. The patch looks fine too.</div><div><br></div><div><div>@@ -23,7 +26,10 @@</div><div> endif()</div><div> </div><div> if(CAN_TARGET_I386)</div><div>- add_library(clang_rt.ubsan-i386 STATIC ${UBSAN_SOURCES})</div>
<div>+ add_library(clang_rt.ubsan-i386 STATIC</div><div>+ ${UBSAN_SOURCES}</div><div>+ $<TARGET_OBJECTS:RTSanitizerCommon.x86_64></div><div><br></div><div>RTSanitizerCommon.i386</div><div><br></div><div>+ )</div>
<div> set_target_compile_flags(clang_rt.ubsan-i386</div><div> ${UBSAN_CFLAGS} ${TARGET_I386_CFLAGS}</div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>On Tue, Oct 30, 2012 at 10:22 AM, Jean-Daniel Dupas<br><<a href="mailto:devlists@shadowlab.org">devlists@shadowlab.org</a>> wrote:<br>> Ping<br>><br>> Le 22 oct. 2012 à 12:51, Jean-Daniel Dupas <<a href="mailto:devlists@shadowlab.org">devlists@shadowlab.org</a>> a écrit :<br>
><br>>> Thanks.<br>>><br>>> Look like you forget to "svn add" the new Makefile and unistd.h though.<br>>><br>>> Here is a rebased svn patch that include these files.<br>>><br>
>> Le 22 oct. 2012 à 12:31, Jonathan Sauer <<a href="mailto:jonathan.sauer@gmx.de">jonathan.sauer@gmx.de</a>> a écrit :<br>>><br>>>> Hello,<br>>>><br>>>> I applied the patch to compiler-rt r166410 (darwin-ubsan.patch did not apply cleanly, most likely due<br>
>>> to changes made in the meantime), and compiler-rt compiles successfully as part of LLVM (i.e. as<br>>>> described at <<a href="http://clang.llvm.org/get_started.html" target="_blank">http://clang.llvm.org/get_started.html</a>>) on OS X 10.6. I rebased your patches to r166410<br>
>>> and attached the new one (made from svn instead of git, though).<br>>>><br>>>><br>>>> Jonathan<br>>>><br>>>> <ubsan.diff><br>>>><br>>>> _______________________________________________<br>
>>> cfe-commits mailing list<br>>>> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>>>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
>><br>>> -- Jean-Daniel<br>>><br>>><br>>><br>>> <ubsan.diff>_______________________________________________<br>>> cfe-commits mailing list<br>>> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>><br>> -- Jean-Daniel<br>><br>><br>><br>><br>> _______________________________________________<br>
> cfe-commits mailing list<br>> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br></div></div><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div><div><br></div>
</div>