[release] debugallocator: use unsigned integer type for pointer arithmetic
ptrdiff_t is a signed integer type and so the expression (std::uintptr_t)(ptr) % page_size could become a negative value. In this case the page_ptr would be the address of the next page after the allocation. This wrong behaviour could be observed on (32bit) PowerPC: here ptr was 0xf78cfe00 and page_ptr was calculated as 0xf78d0000 instead of the correct 0xf78c0000.
Please register or sign in to comment