summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoni L <EnderMoneyMod@gmail.com>2024-02-02 17:04:27 -0300
committerGitHub <noreply@github.com>2024-02-02 12:04:27 -0800
commitd5666098d1af5f5929babacb6a7ad7d1a54ed984 (patch)
tree33490e3f1981d94b0d3906d73b918a6bd34d7851
parente4a6d92191fa5b4b1aab5643dbabbe76c93427a5 (diff)
downloadwabt-d5666098d1af5f5929babacb6a7ad7d1a54ed984.tar.gz
wabt-d5666098d1af5f5929babacb6a7ad7d1a54ed984.tar.bz2
wabt-d5666098d1af5f5929babacb6a7ad7d1a54ed984.zip
Do not use guard pages on big-endian (#2382)
-rw-r--r--wasm2c/wasm-rt.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/wasm2c/wasm-rt.h b/wasm2c/wasm-rt.h
index c8d7bd01..32a29c98 100644
--- a/wasm2c/wasm-rt.h
+++ b/wasm2c/wasm-rt.h
@@ -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