bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Suppressing sanitizer in sha256.c


From: Eric Blake
Subject: Re: Suppressing sanitizer in sha256.c
Date: Tue, 3 Apr 2018 16:18:44 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 04/03/2018 04:03 PM, Paul Eggert wrote:
> On 04/03/2018 01:47 PM, Tim Rühsen wrote:
>> This is expected behavior but still it rings the 'alarm bell'.
> 
> My kneejerk reaction is that the code has well-defined behavior and I'd
> rather that developers didn't use -fsanitize=unsigned-integer-overflow.
> For Gnulib, that flag is more trouble than it's worth.

I can see the validity of claiming that signed integer overflow is
undefined behavior, but I thought the C standard was pretty clear that
unsigned integer overflow is well-defined and performs modulo
arithmetic.  What are the clang developers using as their justification
for this warning?  Paul is probably correct that the warning is a bug in
clang, if they can't back up their warning with an actual quote from the
C standard.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]