MemoryRegion::is_disjoint_from
can overflow on u64
addition
#320
Labels
🪳 bug
Something is not working
MemoryRegion::is_disjoint_from
can overflow on u64
addition
#320
The following test panics, because of the value of the
free_mem_page_ptr
field.The problem arises because the$2^{32}$ . And $-1 + 2^{32} = 2^{64} - 2^{32} + 2^{32} = 0\ mod\ 2^{64}$ , which is an overflow.
free_mem_page_ptr
region is assumed to have a size ofMEM_PAGE_SIZE
=The overflowing addition happens here.
The text was updated successfully, but these errors were encountered: