On Thu, Oct 4, 2012 at 3:36 AM, Kostya Serebryany <span dir="ltr"><<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br></div><div>asan/tsan/msan generally avoid #including system headers, especially in .h files. </div><div>Once you start porting the code to non-linux, you'll know why. </div><div>compiler-rt/lib/sanitizer_common contains lots of useful stuff that allows you to avoid using system headers. </div>
<div>WDYT? </div></blockquote><div><br></div><div>I was trying to steer clear of most system headers, but I've tried a bit harder now; new patch attached.</div><div><br></div><div>I'm not concerned about the includes in ubsan_diag.cc, since I intend for that code to be replaced in the medium term (and to be made user-replaceable -- some applications will want to provide their own reporting functionality). That only leaves <stdint.h> and <stddef.h>, which are both provided by Clang. I'm not hugely interested in making the runtime build with any other compiler, since you need to have a Clang which can target your platform anyway in order for it to be useful.</div>
</div>