diff --git a/core/iwasm/common/wasm_memory.c b/core/iwasm/common/wasm_memory.c index e97f92df..c01f9d28 100644 --- a/core/iwasm/common/wasm_memory.c +++ b/core/iwasm/common/wasm_memory.c @@ -95,7 +95,7 @@ wasm_memory_init_with_allocator(void *_malloc_func, void *_realloc_func, static inline bool is_bounds_checks_enabled(WASMModuleInstanceCommon *module_inst) { -#if WASM_CONFIGUABLE_BOUNDS_CHECKS != 0 +#if WASM_CONFIGURABLE_BOUNDS_CHECKS != 0 return wasm_runtime_is_bounds_checks_enabled(module_inst); #else return true; diff --git a/core/iwasm/common/wasm_runtime_common.c b/core/iwasm/common/wasm_runtime_common.c index a8b3da6d..ddd5aa8c 100644 --- a/core/iwasm/common/wasm_runtime_common.c +++ b/core/iwasm/common/wasm_runtime_common.c @@ -2581,7 +2581,7 @@ wasm_runtime_get_custom_data(WASMModuleInstanceCommon *module_inst_comm) return module_inst->custom_data; } -#if WASM_CONFIGUABLE_BOUNDS_CHECKS != 0 +#if WASM_CONFIGURABLE_BOUNDS_CHECKS != 0 void wasm_runtime_set_bounds_checks(WASMModuleInstanceCommon *module_inst, bool enable) diff --git a/core/iwasm/common/wasm_runtime_common.h b/core/iwasm/common/wasm_runtime_common.h index 367ea88f..74785d3f 100644 --- a/core/iwasm/common/wasm_runtime_common.h +++ b/core/iwasm/common/wasm_runtime_common.h @@ -603,7 +603,7 @@ wasm_runtime_set_user_data(WASMExecEnv *exec_env, void *user_data); WASM_RUNTIME_API_EXTERN void * wasm_runtime_get_user_data(WASMExecEnv *exec_env); -#if WASM_CONFIGUABLE_BOUNDS_CHECKS != 0 +#if WASM_CONFIGURABLE_BOUNDS_CHECKS != 0 /* See wasm_export.h for description */ WASM_RUNTIME_API_EXTERN void wasm_runtime_set_bounds_checks(WASMModuleInstanceCommon *module_inst, diff --git a/core/iwasm/interpreter/wasm_interp_classic.c b/core/iwasm/interpreter/wasm_interp_classic.c index 72a81ea8..e129e771 100644 --- a/core/iwasm/interpreter/wasm_interp_classic.c +++ b/core/iwasm/interpreter/wasm_interp_classic.c @@ -1181,7 +1181,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module, uint8 value_type; #if !defined(OS_ENABLE_HW_BOUND_CHECK) \ || WASM_CPU_SUPPORTS_UNALIGNED_ADDR_ACCESS == 0 -#if WASM_CONFIGUABLE_BOUNDS_CHECKS != 0 +#if WASM_CONFIGURABLE_BOUNDS_CHECKS != 0 bool disable_bounds_checks = !wasm_runtime_is_bounds_checks_enabled( (WASMModuleInstanceCommon *)module); #else diff --git a/core/iwasm/interpreter/wasm_interp_fast.c b/core/iwasm/interpreter/wasm_interp_fast.c index 330f5568..fe5ffd1c 100644 --- a/core/iwasm/interpreter/wasm_interp_fast.c +++ b/core/iwasm/interpreter/wasm_interp_fast.c @@ -1207,7 +1207,7 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module, uint8 opcode, local_type, *global_addr; #if !defined(OS_ENABLE_HW_BOUND_CHECK) \ || WASM_CPU_SUPPORTS_UNALIGNED_ADDR_ACCESS == 0 -#if WASM_CONFIGUABLE_BOUNDS_CHECKS != 0 +#if WASM_CONFIGURABLE_BOUNDS_CHECKS != 0 bool disable_bounds_checks = !wasm_runtime_is_bounds_checks_enabled( (WASMModuleInstanceCommon *)module); #else diff --git a/core/iwasm/interpreter/wasm_runtime.h b/core/iwasm/interpreter/wasm_runtime.h index 1bd51551..b4f616f3 100644 --- a/core/iwasm/interpreter/wasm_runtime.h +++ b/core/iwasm/interpreter/wasm_runtime.h @@ -220,7 +220,7 @@ typedef struct WASMModuleInstanceExtraCommon { CApiFuncImport *c_api_func_imports; /* pointer to the exec env currently used */ WASMExecEnv *cur_exec_env; -#if WASM_CONFIGUABLE_BOUNDS_CHECKS != 0 +#if WASM_CONFIGURABLE_BOUNDS_CHECKS != 0 /* Disable bounds checks or not */ bool disable_bounds_checks; #endif diff --git a/product-mini/platforms/nuttx/wamr.mk b/product-mini/platforms/nuttx/wamr.mk index 93cd618d..57995c2b 100644 --- a/product-mini/platforms/nuttx/wamr.mk +++ b/product-mini/platforms/nuttx/wamr.mk @@ -236,10 +236,10 @@ else CFLAGS += -DWASM_ENABLE_LIBC_BUILTIN=0 endif -ifeq ($(CONFIG_INTERPRETERS_WAMR_CONFIGUABLE_BOUNDS_CHECKS),y) -CFLAGS += -DWASM_CONFIGUABLE_BOUNDS_CHECKS=1 +ifeq ($(CONFIG_INTERPRETERS_WAMR_CONFIGURABLE_BOUNDS_CHECKS),y) +CFLAGS += -DWASM_CONFIGURABLE_BOUNDS_CHECKS=1 else -CFLAGS += -DWASM_CONFIGUABLE_BOUNDS_CHECKS=0 +CFLAGS += -DWASM_CONFIGURABLE_BOUNDS_CHECKS=0 endif ifeq ($(CONFIG_INTERPRETERS_WAMR_LIBC_WASI),y) diff --git a/product-mini/platforms/posix/main.c b/product-mini/platforms/posix/main.c index c225b085..930d9db5 100644 --- a/product-mini/platforms/posix/main.c +++ b/product-mini/platforms/posix/main.c @@ -69,7 +69,7 @@ print_help() #endif printf(" --repl Start a very simple REPL (read-eval-print-loop) mode\n" " that runs commands in the form of \"FUNC ARG...\"\n"); -#if WASM_CONFIGUABLE_BOUNDS_CHECKS != 0 +#if WASM_CONFIGURABLE_BOUNDS_CHECKS != 0 printf(" --disable-bounds-checks Disable bounds checks for memory accesses\n"); #endif #if WASM_ENABLE_LIBC_WASI != 0 @@ -571,7 +571,7 @@ main(int argc, char *argv[]) #endif bool is_repl_mode = false; bool is_xip_file = false; -#if WASM_CONFIGUABLE_BOUNDS_CHECKS != 0 +#if WASM_CONFIGURABLE_BOUNDS_CHECKS != 0 bool disable_bounds_checks = false; #endif #if WASM_ENABLE_LIBC_WASI != 0 @@ -638,7 +638,7 @@ main(int argc, char *argv[]) else if (!strcmp(argv[0], "--repl")) { is_repl_mode = true; } -#if WASM_CONFIGUABLE_BOUNDS_CHECKS != 0 +#if WASM_CONFIGURABLE_BOUNDS_CHECKS != 0 else if (!strcmp(argv[0], "--disable-bounds-checks")) { disable_bounds_checks = true; } @@ -886,7 +886,7 @@ main(int argc, char *argv[]) goto fail3; } -#if WASM_CONFIGUABLE_BOUNDS_CHECKS != 0 +#if WASM_CONFIGURABLE_BOUNDS_CHECKS != 0 if (disable_bounds_checks) { wasm_runtime_set_bounds_checks(wasm_module_inst, false); }