mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 21:28:21 +00:00
fix(vm) Fix the memory_grow test on Windows (with a bigger page guard)
This commit is contained in:
@@ -52,13 +52,19 @@ impl BaseTunables {
|
|||||||
|
|
||||||
// Allocate a small guard to optimize common cases but without
|
// Allocate a small guard to optimize common cases but without
|
||||||
// wasting too much memory.
|
// wasting too much memory.
|
||||||
|
// The Windows memory manager seems more laxed than the other ones
|
||||||
|
// And a guard of just 1 page may not be enough is some borderline cases
|
||||||
|
// So using 2 pages for guard on this plateform
|
||||||
|
#[cfg(target_os = "windows")]
|
||||||
|
let dynamic_memory_offset_guard_size: u64 = 0x2_0000;
|
||||||
|
#[cfg(not(target_os = "windows"))]
|
||||||
let dynamic_memory_offset_guard_size: u64 = 0x1_0000;
|
let dynamic_memory_offset_guard_size: u64 = 0x1_0000;
|
||||||
|
|
||||||
if let OperatingSystem::Windows = triple.operating_system {
|
if let OperatingSystem::Windows = triple.operating_system {
|
||||||
// For now, use a smaller footprint on Windows so that we don't
|
// For now, use a smaller footprint on Windows so that we don't
|
||||||
// outstrip the paging file.
|
// outstrip the paging file.
|
||||||
static_memory_bound = min(static_memory_bound, 0x100.into());
|
static_memory_bound = min(static_memory_bound, 0x100.into());
|
||||||
static_memory_offset_guard_size = min(static_memory_offset_guard_size, 0x10000);
|
static_memory_offset_guard_size = min(static_memory_offset_guard_size, 0x20000);
|
||||||
}
|
}
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
|
|||||||
@@ -35,9 +35,6 @@ cranelift multi_value_imports::dylib
|
|||||||
singlepass multi_value_imports::dylib
|
singlepass multi_value_imports::dylib
|
||||||
singlepass multi_value_imports::dynamic
|
singlepass multi_value_imports::dynamic
|
||||||
|
|
||||||
# Memory load doesn't trap as expected when out out bounds in Windows
|
|
||||||
windows+cranelift spec::memory_grow
|
|
||||||
|
|
||||||
# LLVM/Universal doesn't work in macOS M1. Skip all tests
|
# LLVM/Universal doesn't work in macOS M1. Skip all tests
|
||||||
llvm+universal+macos+aarch64 *
|
llvm+universal+macos+aarch64 *
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user