Skip to content

Commit

Permalink
Do not use guard pages on big-endian (WebAssembly#2382)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoniEx2 authored Feb 2, 2024
1 parent e4a6d92 commit d566609
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions wasm2c/wasm-rt.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,13 @@ extern "C" {
*
* This defaults to GUARD_PAGES as this is the fasest option, iff the
* requirements of GUARD_PAGES --- 64-bit platforms, MMAP allocation strategy,
* no 64-bit memories --- are met. This falls back to BOUNDS otherwise.
* no 64-bit memories, no big-endian --- are met. This falls back to BOUNDS
* otherwise.
*/

/** Check if Guard checks are supported */
#if UINTPTR_MAX > 0xffffffff && WASM_RT_USE_MMAP && !SUPPORT_MEMORY64
#if UINTPTR_MAX > 0xffffffff && WASM_RT_USE_MMAP && !SUPPORT_MEMORY64 && \
!WABT_BIG_ENDIAN
#define WASM_RT_GUARD_PAGES_SUPPORTED 1
#else
#define WASM_RT_GUARD_PAGES_SUPPORTED 0
Expand Down

0 comments on commit d566609

Please sign in to comment.