<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 4, 2013 at 10:57 PM, 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Are you sure your test is correct? <div>It looks too simplistic and the compiler may turn it into something else.</div>
<div>On my x86 box: </div><div><br></div><div><div>% clang z.c ; ./a.out </div><div>Segmentation fault (core dumped)</div>
<div>% clang z.c -O; ./a.out </div><div># <passed></div></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Fri, Oct 4, 2013 at 9:13 PM, Greg Fitzgerald <span dir="ltr"><<a href="mailto:garious@gmail.com" target="_blank">garious@gmail.com</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"><div>On Thu, Oct 3, 2013 at 9:58 PM, Kostya Serebryany <<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>> wrote:<br>
> Meanwhile, could you try to reverse the order of these two call in<br>
> asan/asan_rtl.cc and see if it helps?<br>
> InstallSignalHandlers();<br>
> AsanTSDInit(AsanThread::TSDDtor);<br>
<br>
</div>That change fixes the assertion problem, but the stack overflow is<br></blockquote><div><br></div></div><div>Good. I'll submit the change late next week. </div></div></div></div></blockquote><div><br></div><div>
Sorry for delay, committed as r192892.</div><div>The failure only affected the combination of ASAN_OPTIONS=verbosity=1:use_sigaltstack=1 and so we didn't see it. </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">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>--kcc </div><div class="im"><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">
still not detected. Here's the code:<br>
<br>
static void loop() {<br>
loop(); // BOOM<br>
<div>}<br>
<br>
int main() {<br>
loop();<br>
return 0;<br>
}<br>
<br>
<br>
</div>And here's how I execute it:<br>
<br>
$ adb shell<br>
# cd /data/data<br>
# ASAN_OPTIONS=use_sigaltstack=1<br>
LD_PRELOAD=/data/data/<a href="http://libclang_rt.asan-arm-android.so" target="_blank">libclang_rt.asan-arm-android.so</a><br>
./example_StackExhaustion<br>
<span><font color="#888888"><br>
<br>
-Greg<br>
</font></span></blockquote></div></div><br></div></div>
</blockquote></div><br></div></div>