Forked from
Core Modules / dune-common
Source project has a limited visibility.
-
Ansgar Burchardt authored
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. (cherry picked from commit 1659ea4b) Signed-off-by:
Carsten Gräser <graeser@dune-project.org>
Ansgar Burchardt authoredptrdiff_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. (cherry picked from commit 1659ea4b) Signed-off-by:
Carsten Gräser <graeser@dune-project.org>