From 1e1fffc02b7e398692d82c47c0e4c6403066e6f6 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 22 Apr 2024 13:27:40 +0900 Subject: [PATCH] core/config.h: Bump the default WASM_STACK_GUARD_SIZE The old value (1KB) doesn't seem sufficient for many cases. I suspect that the new value is still not sufficient for some cases. But it's far safer than the old value. Consider if the classic interpreter loop (2600 bytes) calls host snprintf. (2000 bytes) Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/3314 --- core/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/config.h b/core/config.h index c341a9ad5..4e55c3312 100644 --- a/core/config.h +++ b/core/config.h @@ -486,7 +486,7 @@ /* UVWASI requires larger native stack */ #define WASM_STACK_GUARD_SIZE (4096 * 6) #else -#define WASM_STACK_GUARD_SIZE (1024) +#define WASM_STACK_GUARD_SIZE (1024 * 5) #endif #endif