<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><br><br><div class="gmail_quote">On Wed, Nov 7, 2012 at 1:12 AM, Kostya Serebryany <span dir="ltr"><<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br><br><div class="gmail_quote"><div class="im">On Tue, Nov 6, 2012 at 1:08 PM, Evgeniy Stepanov <span dir="ltr"><<a href="mailto:eugenis@google.com" target="_blank">eugenis@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">This whole -fsanitize= thing looks unorthodox and confusing to me. I understand why me might want to merge all sanitizers under one switch, but we don't need to put their suboptions there, too.</p>

</blockquote></div><div>In the suggested syntax, the suboptions that control the behavior of tools are not using -fsanitize= prefix. </div><div>But if we enable an extra functionality in e.g. asan, it could be viewed as a separate checker that depends on asan, thus</div>

<div>-fsanitize=address,use-after-return makes sense (IMHO).</div></div></div></blockquote><div><br></div><div>I agree with that.</div><div><br></div><div>One more random thought - ASan supports blacklist file (-mllvm -asan-blacklist). Do we want to pull this flag into Clang as well?</div>
<div>Can the family of undefined-behavior sanitizers make use of it? It looks like I've forgotten the reason why this file is used</div><div>at LLVM level, not in Clang. IIUC in Clang we can just avoid emitting address_safety attribute for functions/globals in the blacklist file.</div>
<div>It can be more convenient for per-function blacklisting (instead of per-file) because we probably can pattern-match names that are not</div><div>yet mangled (can't we?)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div class="gmail_quote"><div><br></div><div>--kcc </div><div class="im"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div>
<div class="gmail_quote">On Nov 6, 2012 11:58 PM, "Alexander Potapenko" <<a href="mailto:glider@google.com" target="_blank">glider@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<p dir="ltr">-fsanitize=address,use-after-return sounds more like two distinct sanitizers than a sanitizer and an option, although this is very similar to the -Wl case.</p>
<div class="gmail_quote">On Nov 6, 2012 10:53 PM, "Kostya Serebryany" <<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="font-family:arial,helvetica,sans-serif;font-size:10pt">Hi, <div><br></div><div>We need more clang flags in two categories: </div><div>   - flags that modify the behavior of asan/tsan/msan</div><div>   - flags that enable additional features of asan/tsan/msan</div>




<div><br></div><div>As we just discussed with Richard Smith, the flags should probably look like this: </div><div><br></div><div>modify the behavior: </div><div>   -f[no-]sanitize-address-zero-base-shadow # zero base for asan, should check that -pie is present, linux-only</div>




<div>   -f[no-]sanitize-memory-track-origins  # msan track-origins (once msan is in trunk, of course)</div><div><br></div><div>add additional features:</div><div>  -fsanitize=address,global-init-order,use-after-return,use-after-scope # asan subphases, currently off by default. </div>




<div><br></div><div>Does that sound good? Anything else? </div><div><br></div><div>Thanks, </div><div><br></div><div>--kcc </div></div>
</blockquote></div>
</blockquote></div>
</div></div></blockquote></div></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div><br>
</div>