<br><br><div class="gmail_quote">On Tue, Oct 9, 2012 at 1:29 AM, Michael Spencer <span dir="ltr"><<a href="mailto:bigcheesegs@gmail.com" target="_blank">bigcheesegs@gmail.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="HOEnZb"><div class="h5">On Thu, Oct 4, 2012 at 11:48 AM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>
> On Thu, Oct 4, 2012 at 3:36 AM, Kostya Serebryany <<a href="mailto:kcc@google.com">kcc@google.com</a>> wrote:<br>
>><br>
>><br>
>> asan/tsan/msan generally avoid #including system headers, especially in .h<br>
>> files.<br>
>> Once you start porting the code to non-linux, you'll know why.<br>
>> compiler-rt/lib/sanitizer_common contains lots of useful stuff that allows<br>
>> you to avoid using system headers.<br>
>> WDYT?<br>
><br>
><br>
> I was trying to steer clear of most system headers, but I've tried a bit<br>
> harder now; new patch attached.<br>
><br>
> I'm not concerned about the includes in ubsan_diag.cc, since I intend for<br>
> that code to be replaced in the medium term (and to be made user-replaceable<br>
> -- some applications will want to provide their own reporting<br>
> functionality). That only leaves <stdint.h> and <stddef.h>, which are both<br>
> provided by Clang. I'm not hugely interested in making the runtime build<br>
> with any other compiler, since you need to have a Clang which can target<br>
> your platform anyway in order for it to be useful.<br>
><br>
</div></div><div class="im">> _______________________________________________<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>
<br>
</div>This fails to compile with -Werror. ubsan_value.cc has 3 functions<br>
with something similar to:<br>
<br>
  SIntMax Value::getSIntValue() const {<br>
    ...<br>
    CHECK(0 && "unexpected bit width");<br>
  }<br>
<br>
Adding __builtin_unreachable(); fixes this. Does compiler-rt have a<br>
compatibility macro for this?<br></blockquote><div><br></div><div>Good idea. I've added UNREACHABLE(msg) macro to common sanitizer defs in r165492.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<span class="HOEnZb"><font color="#888888"><br>
- Michael Spencer<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div><br>