On 14/02/17 03:09, hyc(a)symas.com wrote:
Hallvard Breien Furuseth wrote:
> On 13/02/17 13:16, hyc(a)symas.com wrote:
>> We should probably check if mv_size is greater than UINT_MAX and return
>> EINVAL. (Or ERANGE.)
> If you mean check for overflow, that doesn't work on 32-bit hosts.
It's not possible to pass in a datacount > UINT_MAX on 32bit so there's no
need for such a check. It's only needed on 64bit where uint is smaller than
I don't get it. You want to add this check for the sake of
avoiding to change dcount,mcount from unsigned to double? Why?
datacount*datasize (passed to page_spill) can overflow on 32-bit, I
thought that's what you meant. But come to think of it, page_spill()
itself more than doubles mv_size which can also overflow on 32-bit
or with 64-bit MDB_MULTIPLE, it needs some tweaks.