Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions core/iwasm/common/wasm_runtime_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -7979,6 +7979,16 @@ wasm_runtime_get_module_name(wasm_module_t module)
return "";
}

#if defined(__GNUC__) || defined(__clang__)
/* In few places we use addresses of local variables for estimating used stack
size. This logic conficts with ASAN, since is uses fake stack for local
variables storage.
*/
#define NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
#else
# define NO_SANITIZE_ADDRESS
#endif

/*
* wasm_runtime_detect_native_stack_overflow
*
Expand All @@ -7988,6 +7998,7 @@ wasm_runtime_get_module_name(wasm_module_t module)
*
* - update native_stack_top_min.
*/
NO_SANITIZE_ADDRESS
bool
wasm_runtime_detect_native_stack_overflow(WASMExecEnv *exec_env)
{
Expand All @@ -8010,6 +8021,7 @@ wasm_runtime_detect_native_stack_overflow(WASMExecEnv *exec_env)
return true;
}

NO_SANITIZE_ADDRESS
bool
wasm_runtime_detect_native_stack_overflow_size(WASMExecEnv *exec_env,
uint32 requested_size)
Expand Down
Loading