From e45354b3ed93876f64a8477883cefbca9932b810 Mon Sep 17 00:00:00 2001 From: Istvan Haller Date: Fri, 6 Aug 2021 16:19:35 +0100 Subject: [PATCH] Changed error handling to assert --- src/backend/pagemap.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/backend/pagemap.h b/src/backend/pagemap.h index 62c97fd..4a92345 100644 --- a/src/backend/pagemap.h +++ b/src/backend/pagemap.h @@ -246,10 +246,8 @@ namespace snmalloc { address_t entry_offset = address_cast(&t) - address_cast(body); address_t entry_index = entry_offset / sizeof(T); - if (entry_offset % sizeof(T) != 0 || entry_index >= num_entries()) - { - PAL::error("Internal error: Invalid Pagemap entry for reverse lookup."); - } + SNMALLOC_ASSERT( + entry_offset % sizeof(T) == 0 && entry_index < num_entries()); return base + (entry_index << GRANULARITY_BITS); }