From b4f23a699f08846e51ee0b7603acf961c57b284d Mon Sep 17 00:00:00 2001 From: cl507523 Date: Tue, 14 Apr 2026 11:47:32 +0000 Subject: [PATCH] fix(runtime): restore readable linear memory permissions Ensure mmap-backed wasm linear memory is reprotected with read+write access, avoiding write-only mappings that can break post-grow reads on stricter platforms. Made-with: Cursor --- src/runtime/memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/memory.cpp b/src/runtime/memory.cpp index e80718a42..0fc26619b 100644 --- a/src/runtime/memory.cpp +++ b/src/runtime/memory.cpp @@ -330,7 +330,7 @@ void WasmMemoryAllocator::mprotectReadWriteWasmMemoryData( } } if (0 != - ::mprotect(Data.MemoryData, Data.MemorySize, PROT_WRITE | PROT_WRITE)) { + ::mprotect(Data.MemoryData, Data.MemorySize, PROT_READ | PROT_WRITE)) { ZEN_ABORT(); } }