When the heap is not page aligned, fail instead of `lucet_bail`
@@ -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
