Thread (4 messages) 4 messages, 3 authors, 2018-06-15

Re: [PATCH 4/3] ewah: adjust callers of ewah_read_mmap()

flat view

From: Junio C Hamano <hidden>
Date: 2018-06-15 16:42:09

Derrick Stolee [off-list ref] writes:
On 6/14/2018 11:44 PM, Jeff King wrote:
quoted
The return value of ewah_read_mmap() is now an ssize_t,
since we could (in theory) process up to 32GB of data. This
would never happen in practice, but a corrupt or malicious
.bitmap or index file could convince us to do so.
Aside: Why a 32GB limit? Usually I see 32-bit issues limiting by 2
(signed) or 4 GB (unsigned). Is there something specifically in the
bitmap format that stops at this size?
The proposed log message for 1/3 has this bit

  - check the size for integer overflow (this should be
    impossible on 64-bit, as the size is given as a 32-bit
    count of 8-byte words, but is possible on a 32-bit
    system)

4 Giga 8-byte words makes 32 Giga bytes, I'd guess.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help