A few native stack detection fixes for macOS/arm64 (#3368)

This commit is contained in:
YAMAMOTO Takashi
2024-04-26 20:37:55 +09:00
committed by GitHub
parent 410ee580ae
commit 120b9659dd
3 changed files with 7 additions and 3 deletions

View File

@ -523,8 +523,13 @@
/* Guard page count for stack overflow check with hardware trap */
#ifndef STACK_OVERFLOW_CHECK_GUARD_PAGE_COUNT
#if defined(__APPLE__) && defined(__aarch64__)
/* Note: on macOS/iOS arm64, the user page size is 16KB */
#define STACK_OVERFLOW_CHECK_GUARD_PAGE_COUNT 1
#else
#define STACK_OVERFLOW_CHECK_GUARD_PAGE_COUNT 3
#endif
#endif
/* Default wasm block address cache size and conflict list size */
#ifndef BLOCK_ADDR_CACHE_SIZE