patch: make ubsan report error summaries

Nick Lewycky nlewycky at google.com
Wed Oct 23 02:21:04 PDT 2013


On 22 October 2013 22:07, Nick Lewycky <nlewycky at google.com> wrote:

> On 22 October 2013 21:18, Nick Lewycky <nlewycky at google.com> wrote:
>
>> The attached patch makes ubsan emit summaries of errors it encounters.
>> The format of these summaries is:
>>   UndefinedBehaviourSanitizer: signed-integer-overflow file:49:7
>> where the string is the flag name. Most of the patch is adding the flag
>> names to all the reports all over.
>>
>
> 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?
>
> Richard, thoughts?
>

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.

Nick


>
> Nick
>
> This patch is stacked on top of
>> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20131021/091535.html ,
>> or else ubsan's tests will fail.
>>
>> Please review!
>>
>> Nick
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131023/2059c81f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ubsan-summary-2.patch
Type: text/x-patch
Size: 20790 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131023/2059c81f/attachment.bin>


More information about the cfe-commits mailing list