Re: [PATCH] Fix overflow in percentile calculation for Windows

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

 



On 10/12/2017 02:51 PM, Sitsofe Wheeler wrote:
> On 12 October 2017 at 15:36, Jens Axboe <axboe@xxxxxxxxx> wrote:
>>
>> Just go through them one-by-one. I think some of these were likely
>> introduced with the nsec conversion, which I guess isn't too
>> surprising...
> 
> With all the latest patches applied these are the only warnings which
> look faintly legitimate:
> 
> io_u.c:1272:28: runtime error: unsigned integer overflow: 0 - 1 cannot
> be represented in type 'unsigned int'
> 
> Might be harmless because we goto out just after td->file_service_left
> has wrapped around.

Might be worth it to clean up, I'll do that.

> ioengines.c:270:22: runtime error: unsigned integer overflow: 59 - 63
> cannot be represented in type 'unsigned int'
> 
> It does look like td->io_u_in_flight is over decremented but it's not
> clear how I/Os that weren't already in flight somehow completed...

Hmm that is odd. I'll look into that.

> stat.c:1529:20: runtime error: unsigned integer overflow: 3370715872 +
> 1125639672 cannot be represented in type 'unsigned int'
> stat.c:1531:23: runtime error: unsigned integer overflow: 3370715859 +
> 1125639668 cannot be represented in type 'unsigned int'
> stat.c:1533:25: runtime error: unsigned integer overflow: 3370715862 +
> 1125639669 cannot be represented in type 'unsigned int'
> 
> The last three are all down to io_u_* structure members being 32 bit.
> Would we want to make them 64 bit and bump the protocol version?

Yes, I think we should make them 64-bit and just bump the protocol
version.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux