<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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div>Okay, that works. But there's one other difference Richard brought up: ReportErrorSummary expects complete error text, while printing is assumed to be continually appending. UBSan manages to print out each piece of the error individually and never allocates any buffers.</div>


<div><br></div><div>I could change UBSan's Printf calls to instead keep appending to an internal buffer and then feed the buffer to __sanitizer_report_error_summary when we're done. I just wanted to point out the difference in these APIs, in case you can think of a way we could do this without require a buffer somewhere.</div>
<div class="im">

<div><br></div></div></div></div></div></blockquote><div><br></div><div>yea... </div><div>asan/tsan/msan also prints most of it's stuff directly (although there is in fact a buffer hidden inside Printf). It only uses an explicit buffer to print the summary. </div>
<div>On a side note: why ubsan doesn't print the stack trace? <br></div><div>I can imagine cases where this will help diagnose a bug. </div><div><br></div><div>--kcc </div></div></div></div>