Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lucet-runtime/lucet-runtime-internals/src/region/mmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down