<div dir="ltr">On Sat, Oct 26, 2013 at 6:39 AM, Kostya Serebryany <span dir="ltr"><<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>></span> wrote:<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">On Fri, Oct 25, 2013 at 10:54 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@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"><div class="gmail_extra"><div><br>
<div class="gmail_quote">On Fri, Oct 25, 2013 at 11:52 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: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">I am not opposed to this change, but I'd like to test it a bit more carefully to make sure none of our users get angry on us for behavior change. <div>


I'd suggest to put this s<span style="font-family:arial,sans-serif;font-size:13px">igtrap under a flag (off by default) and then flip the default to true after a bit of testing. </span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">We already have </span><span style="font-size:13px;font-family:arial,sans-serif">abort_on_error, may add sigtrap_on_error or some such. </span></div></div></blockquote>


</div><br></div>Ugh.</div><div class="gmail_extra"><br></div><div class="gmail_extra">So, I'm kind of sad about this because this is the number one most frustrating part of debugging UBSan and ASan failures -- they completely misbehave when running under gdb. =[</div>

</div></blockquote><div><br></div></div></div><div>I've analyzed 1000+ asan reports and never needed to debug asan reports in gdb (aside from cases when it was an asan bug). </div><div>I'd like to understand more why users need that.</div>
</div></div></div></blockquote><div><br></div><div>Imagine you have an asan report in code you're not overly familiar with,  and you don't have a good code browsing tool. gdb is often the easiest way to understand why things happened to get into the state they're in (at least for me), without having to read all the code.</div>
<div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div>For ubsan the solution is to print stack traces (Alexey and Richard discussed this already, afaik, and have a plan).</div><div>Some users did want gdb and so there is an easy solution: in gdb you can put a breakpoint on __asan_* (__ubsan*) function: </div>

<div><a href="https://code.google.com/p/address-sanitizer/wiki/AddressSanitizer#gdb" target="_blank">https://code.google.com/p/address-sanitizer/wiki/AddressSanitizer#gdb</a><br></div><div><br></div><div>Making *san trap on error will make gdb experience even better, but I do want to make sure it doesn't hurt other use cases. </div>

<div><br></div><div>--kcc </div><div> </div></div><br></div></div>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div>