<div dir="ltr">Hi Tom, <div><br></div><div>Before we try to answer "are there any other reasons to not do X", </div><div>(and I don't know the answer off the top of my head)</div><div>I'd like to hear your "reasons to do X". </div><div><br></div><div>Bundling -fno-stack-protector with e.g. ASAN serves no purpose that I can see. </div><div>-fno-stack-protector is a production feature. <br></div><div>It is a (weak but useful) security mitigation, it doesn't help to find bugs. </div><div>ASAN (and other sanitizers) are testing tools, not commonly used in production. </div><div>They find stack buffer overflows much better than fno-stack-protector does. </div><div><br></div><div>The exception is perhaps UBSAN with minimal run-time or in trap mode. </div><div>This one *is* commonly used in production and it would be reasonable to allow it together with -fno-stack-protector. </div><div><br></div><div>--kcc </div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 19, 2021 at 4:21 PM Tom Stellard via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
According to <a href="https://github.com/llvm/llvm-project/commit/5829a98c48cf9009e4887e89e3075b3058909e8e" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/5829a98c48cf9009e4887e89e3075b3058909e8e</a><br>
the sanitizers are compiled with -fno-stack-protector to avoid introducing a libc dependency.<br>
Is this still necessary?  Are there any other reasons why sanitizers cannot be compiled with<br>
stack protector enabled?<br>
<br>
-Tom<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>