<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 7, 2015 at 2:24 AM, David Chisnall <span dir="ltr"><<a href="mailto:csdavec@swan.ac.uk" target="_blank">csdavec@swan.ac.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">A couple of high-level comments:<br>
<br>
I don't really like making this a sanitizer.  It is supposed to be useable in the same places stack canaries are used (i.e. in production, with a view to enabling it for 100% of code).  Making it an -fsanitize option makes it seem like a debugging tool, not a mitigation tool.<br></blockquote><div><br></div><div>Disagree. We already have -fsanitize=cfi, which *is* a mitigation tool. </div><div>Having it as -fsanitize=* brings harmony and consistence (and reuses the flag analysis code, which is not trivial). </div><div>Stack canaries are a joke (yes, sorry, it is a very weak protection) and being similar to stack canaries is not a good thing by any account.</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>
I'm also not 100% convinced by the compiler-rt stuff.  This needs to be in libc.  </blockquote><div><br></div><div>Yes. If a given libc fully supports a feature X we simply do not link that part of compiler-rt into the app. </div><div>This is a simple clang driver feature. </div><div>But we don't have it in any popular libc today and will not have it until the tool proves to be useful. </div><div><br></div><div>--kcc </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">What happens when a program dlopens libpthread?  The pthread_create symbol won't exist on library load, so it looks as if your interceptor code will just see a null pointer.  Then when the first thread is created, it will die horribly.<br>
<div class=""><div class="h5"><br>
<br>
<a href="http://reviews.llvm.org/D6096" target="_blank">http://reviews.llvm.org/D6096</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div>