<br><br><div class="gmail_quote">On Fri, Jul 27, 2012 at 12:11 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">
Hi Nick, <div>Thanks for the bug report!</div><div>I've submitted r160853 which fixes both strcmp and strncmp. <br></div></blockquote><div><br></div><div>r160853 solves the problem for "strncmp", but it doesn't solve the problem for "strcmp". Please see my comment in <a href="http://code.google.com/p/address-sanitizer/issues/detail?id=94" target="_blank">http://code.google.com/p/address-sanitizer/issues/detail?id=94</a> .</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br><div class="gmail_quote"><div class="im">On Fri, Jul 27, 2012 at 12:57 AM, Nick Kralevich <span dir="ltr"><<a href="mailto:nnk@google.com" target="_blank">nnk@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I filed <a href="http://code.google.com/p/address-sanitizer/issues/detail?id=94" target="_blank">http://code.google.com/p/address-sanitizer/issues/detail?id=94</a>,<br>


but I was told that this mailing list is a better place to submit<br>
patches.<br></blockquote><div><br></div></div><div>Either one is fine. </div></div></div></blockquote><div><br></div><div>Sorry for the duplicate messages. I'll continue this conversation in <a href="http://code.google.com/p/address-sanitizer/issues/detail?id=94" target="_blank">http://code.google.com/p/address-sanitizer/issues/detail?id=94</a></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="gmail_quote"><div><br></div><div>--kcc </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
<br>
If ASAN's strncmp function is called early enough in a program's<br>
lifecycle, ASAN will segfault. This is due to ASAN's strncmp not<br>
calling ENSURE_ASAN_INITED().  More details are in the bug above.<br>
<br>
A 1 line patch is attached which resolves this issue.<br>
<br>
A similar bug is present in ASAN's strcmp function.  It too does not<br>
call ENSURE_ASAN_INITED().  It's not clear to me whether this is<br>
intentional or not.<br>
<span><font color="#888888"><br>
-- Nick<br>
</font></span><br></div>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Nick Kralevich | Android Security | <a href="mailto:nnk@google.com" target="_blank">nnk@google.com</a> | 650.214.4037</div><br>