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:
@ -396,3 +396,7 @@ if (WAMR_DISABLE_WRITE_GS_BASE EQUAL 1)
|
||||
add_definitions (-DWASM_DISABLE_WRITE_GS_BASE=1)
|
||||
message (" Write linear memory base addr to x86 GS register disabled")
|
||||
endif ()
|
||||
if (WAMR_CONFIGUABLE_BOUNDS_CHECKS EQUAL 1)
|
||||
add_definitions (-DWASM_CONFIGURABLE_BOUNDS_CHECKS=1)
|
||||
message (" Configurable bounds checks enabled")
|
||||
endif ()
|
||||
|
||||
Reference in New Issue
Block a user