<div dir="ltr">On 23 October 2013 15:29, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><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">I'm not really happy about including the 'summary' in the normal output -- it's ugly and redundant. If we want to provide this to people who want summaries, that's fine, but the default should either be that this output goes nowhere, or that the summary text is exactly the 'runtime error:' line.</div>


</blockquote><div><br></div><div>Okay, how about this direction. Let's add a sanitizer_common flag which controls whether summaries are printed. The sanitizers can check the flag and decide not to call the API (ie., to avoid requiring a buffer) and the default implementation of the API checks the flag again and does nothing if called with the flag off. Then we turn that flag on with the RUN lines to test our summary emission, but it defaults to off for users that don't want it.</div>


<div><br></div><div>+cc Kostya. Does that work for both of you? I agree with Richard that (my idea of "normal") normal users would find this output redundant, hence the idea to default the flag to off.</div><div>

<br></div><div>Nick</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<div class="gmail_extra">On Wed, Oct 23, 2013 at 2:51 PM, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>></span> wrote:<br><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>On 23 October 2013 11:18, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>



</div><div class="gmail_extra"><div class="gmail_quote"><div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>On Wed, Oct 23, 2013 at 2:21 AM, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>></span> wrote:<br>





</div><div class="gmail_extra"><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>On 22 October 2013 22:07, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>></span> wrote:<br>






</div><div class="gmail_extra"><div class="gmail_quote"><div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>On 22 October 2013 21:18, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>></span> wrote:<br>








</div><div class="gmail_extra"><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The attached patch makes ubsan emit summaries of errors it encounters. The format of these summaries is:<div>









  UndefinedBehaviourSanitizer: signed-integer-overflow file:49:7</div><div>where the string is the flag name. Most of the patch is adding the flag names to all the reports all over.</div></div></blockquote><div><br></div>









</div><div>I've noticed a small bug, for load-invalid-value we always pick "enum" and never "bool". I would guess that's because ASTContext::getTypeSize(BoolTy) returns 8 instead of 1? </div><div>








<br>
</div><div>Richard, thoughts?</div></div></div></div></blockquote><div><br></div></div><div>Updated patch attached. It now detects bool sanitizer by looking at the Type as a string, and is otherwise updated for the changes in sanitizer-common.</div>






</div></div></div></blockquote><div><br></div></div><div>This does the wrong thing for typedefs of bool. Can we emit a flag as part of the static info to say whether this was the bool sanitizer or the enum sanitizer? Otherwise, I don't see how we can distinguish the typedef-for-bool case from the enum-with-underlying-type-bool case.</div>





</div></div></div></blockquote><div><br></div></div><div>Done. Patch attached!</div><div><div><br></div><div>Nick</div><div> </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"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="ltr"><div class="gmail_extra">

<div class="gmail_quote"><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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div dir="ltr"><div>This patch is stacked on top of <a href="http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131021/091535.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131021/091535.html</a> , or else ubsan's tests will fail.<br>









</div>
<div><br></div><div>Please review!<span><font color="#888888"><br></font></span></div><span><font color="#888888"><div><br></div><div>Nick</div></font></span></div>
</blockquote></div></div><br></div></div>
</blockquote></div></div><br></div></div>
<br></div><div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">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></div></blockquote></div><br></div></div>
</blockquote></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>