Make memory access boundary check behavior configurable (#2289)
Allow to use `cmake -DWAMR_CONFIGURABLE_BOUNDS_CHECKS=1` to build iwasm, and then run `iwasm --disable-bounds-checks` to disable the memory access boundary checks. And add two APIs: `wasm_runtime_set_bounds_checks` and `wasm_runtime_is_bounds_checks_enabled`
This commit is contained in:
@ -230,6 +230,12 @@ else
|
||||
CFLAGS += -DWASM_ENABLE_LIBC_BUILTIN=0
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_INTERPRETERS_WAMR_CONFIGUABLE_BOUNDS_CHECKS),y)
|
||||
CFLAGS += -DWASM_CONFIGUABLE_BOUNDS_CHECKS=1
|
||||
else
|
||||
CFLAGS += -DWASM_CONFIGUABLE_BOUNDS_CHECKS=0
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_INTERPRETERS_WAMR_LIBC_WASI),y)
|
||||
CFLAGS += -DWASM_ENABLE_LIBC_WASI=1
|
||||
CFLAGS += -I$(IWASM_ROOT)/libraries/libc-wasi/sandboxed-system-primitives/src
|
||||
|
||||
Reference in New Issue
Block a user