diff --git a/lucet-runtime/lucet-runtime-internals/src/region/mmap.rs b/lucet-runtime/lucet-runtime-internals/src/region/mmap.rs index 4ad313e6e..b8542535b 100644 --- a/lucet-runtime/lucet-runtime-internals/src/region/mmap.rs +++ b/lucet-runtime/lucet-runtime-internals/src/region/mmap.rs @@ -113,9 +113,11 @@ impl RegionInternal for MmapRegion { .pop() .ok_or(Error::RegionFull(self.capacity))?; - if slot.heap as usize % host_page_size() != 0 { - lucet_bail!("heap is not page-aligned; this is a bug"); - } + assert_eq!( + slot.heap as usize % host_page_size(), + 0, + "heap must be page-aligned" + ); for (ptr, len) in [ // make the stack read/writable