svn commit: r318736 - in head: cddl/lib/libzfs contrib/compiler-rt/lib/sanitizer_common contrib/openbsm/libbsm include lib/libarchive lib/libc/gen lib/libc/include lib/libc/sys lib/libkvm lib/libmi...

Ngie Cooper (yaneurabeya) yaneurabeya at gmail.com
Wed May 24 21:08:27 UTC 2017


> On May 24, 2017, at 09:26, Ed Maste <emaste at freebsd.org> wrote:
> 
> On 24 May 2017 at 10:53, Pedro Giffuni <pfg at freebsd.org> wrote:
>> 
>> There is now a bunch of coverity issues (OVERFLOW_BEFORE_WIDEN mostly)
>> tied to ino64_t. At least the following CIDs are related:
> 
> On a quick look the OVERFLOW_BEFORE_WIDEN issues are false positives
> in practice: for correct operation the product must fit within 32
> bits, because inodes were previously 32 bits. However, it does seem
> unusual to perform a multiplication with types that could overflow 32
> bits, and then store the result in a 64-bit variable. So it seems that
> a code change to eliminate the warning is likely reasonable.

Wouldn’t the proper fix be:
- Check the inode value for overflow?
- Cast to the smaller historical value?
Or:
- Widen the type for the smaller historical value to a larger value?
Thanks,
-Ngie

PS I’d have to see how we fixed this internally at Isilon. We might have a patch kicking around for this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20170524/7f2c8a26/attachment.sig>


More information about the svn-src-all mailing list