fix invalid pointer detection in release mode (issue #1051 and #1053)

This commit is contained in:
Daan 2025-03-31 10:54:12 -07:00
parent a73c3cc7e2
commit 71b3e16171
4 changed files with 10 additions and 23 deletions

View file

@ -210,9 +210,7 @@ bool _mi_page_map_init(void) {
if (!mi_page_map_memid.initially_committed) {
_mi_os_commit(_mi_page_map[0], os_page_size, NULL); // only first OS page
}
_mi_page_map[0][0] = (mi_page_t*)&_mi_page_empty; // caught in `mi_free`
mi_assert_internal(_mi_ptr_page(NULL)==&_mi_page_empty);
mi_assert_internal(_mi_ptr_page(NULL)==NULL);
return true;
}