Fix assertion in snapshot module for pages that are equal to SNAPSHOT_PAGE_SIZE (#2738)
Co-authored-by: Scott Powell <scott.powell@str.us>
This commit is contained in:
parent
36734083f9
commit
0dabc34329
@ -257,7 +257,7 @@ impl SnapshotModule {
|
||||
|
||||
pub fn access(&mut self, addr: GuestAddr, size: usize) {
|
||||
// ASSUMPTION: the access can only cross 2 pages
|
||||
debug_assert!(size > 0 && size < SNAPSHOT_PAGE_SIZE);
|
||||
debug_assert!(size > 0 && size <= SNAPSHOT_PAGE_SIZE);
|
||||
let page = addr & SNAPSHOT_PAGE_MASK;
|
||||
self.page_access(page);
|
||||
let second_page = (addr + size as GuestAddr - 1) & SNAPSHOT_PAGE_MASK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user