fix sized deallocation check with large sizes
The CONFIG_CXX_ALLOCATOR feature enables sanity checks for sized deallocation and this wasn't updated to handle the introduction of performing size class rounding for large sizes.pull/131/head
parent
8d0314295e
commit
b90f650153
|
@ -1235,7 +1235,7 @@ static void deallocate_large(void *p, const size_t *expected_size) {
|
|||
fatal_error("invalid free");
|
||||
}
|
||||
size_t size = region->size;
|
||||
if (expected_size && size != *expected_size) {
|
||||
if (expected_size && size != get_large_size_class(*expected_size)) {
|
||||
fatal_error("sized deallocation mismatch (large)");
|
||||
}
|
||||
size_t guard_size = region->guard_size;
|
||||
|
|
Loading…
Reference in New Issue