wasm: initialise the heap with one page of memory (otherwise some tests crash)

This commit is contained in:
Brian Carroll 2022-05-31 23:05:39 +02:00
parent f063064e01
commit 86d14b9391
No known key found for this signature in database
GPG Key ID: 5C7B2EC4101703C0

View File

@ -126,7 +126,8 @@ impl<'a> WasmBackend<'a> {
init: ConstExpr::I32(stack_heap_boundary as i32),
});
module.memory = MemorySection::new(env.arena, stack_heap_boundary);
module.memory =
MemorySection::new(env.arena, stack_heap_boundary + MemorySection::PAGE_SIZE);
module.export.append(Export {
name: MEMORY_NAME,
ty: ExportType::Mem,