> On May 24, 2017, at 09:26, Ed Maste <ema...@freebsd.org> wrote: > > On 24 May 2017 at 10:53, Pedro Giffuni <p...@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.
signature.asc
Description: Message signed with OpenPGP using GPGMail