diff --git a/d3d12/crates/leonida-loader/src/crash.rs b/d3d12/crates/leonida-loader/src/crash.rs index 6eeebaf10e..33c66b9540 100644 --- a/d3d12/crates/leonida-loader/src/crash.rs +++ b/d3d12/crates/leonida-loader/src/crash.rs @@ -912,8 +912,11 @@ mod tests { assert_eq!(memory_at(base + 0x3008), "no access"); // SAFETY: releases the reservation made above. unsafe { VirtualFree(base as *mut _, 0, MEM_RELEASE) }; - assert_eq!(memory_at(base + 8), "nothing mapped there"); + // Do not query `base` after `MEM_RELEASE`: concurrent test threads can + // immediately reuse the released VA as `PAGE_READWRITE`. Windows keeps + // the low 64 KiB (`0..0x10000`) permanently unmapped (`MEM_FREE`). assert_eq!(memory_at(0), "nothing mapped there"); + assert_eq!(memory_at(0x1008), "nothing mapped there"); assert_eq!(memory_at(usize::MAX), "outside the address space"); // This test's own code: an image page, named by its module. let code = memory_at(memory_at_names_what_an_access_hit as *const () as usize);