Skip to content
Closed
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
5 changes: 4 additions & 1 deletion crates/victory-gpu/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2528,7 +2528,7 @@ mod batch { // Batch::texture_due lives here; `mod tests` is already taken at
// SAFETY: our pool, guarded since the copy took it.
unsafe { ((p + PAGE + 8) as *mut u8).write_volatile(7) };
// The next submission: two lists ask for the copy.
let mut batch = Batch::default();
batch = Batch::default();
batch.add(&copy, p, len);
batch.add(&copy, p + 100, 200);
assert_eq!(batch.flush(), PAGE, "the page written");
Expand All @@ -2541,6 +2541,9 @@ mod batch { // Batch::texture_due lives here; `mod tests` is already taken at
batch.add(&copy, p, len);
assert_eq!(batch.flush(), PAGE, "after a title write, what changed");
crate::shadow::unregister(p, p as u64);
// The batch holds the copy, which watches the pool: gone before the
// pool, whose addresses a test running beside this one may take.
drop(batch);
drop(copy);
crate::watch::tests::free(p);
}
Expand Down
Loading