YJIT: Assert code pages are not partially in-bounds

Helps understand page switching
This commit is contained in:
Alan Wu 2023-12-05 11:40:17 -05:00
parent 695e5c179e
commit a063969ec1

View File

@ -136,6 +136,10 @@ impl CodeBlock {
};
cb.page_end_reserve = cb.jmp_ptr_bytes();
cb.write_pos = cb.page_start();
#[cfg(not(test))]
assert_eq!(0, mem_size % page_size, "partially in-bounds code pages should be impossible");
cb
}