mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-10-16 13:02:32 +00:00
Apply no_sanitize_address for clang compiler in several places (#2663)
Apply `no_sanitize_address` for clang compiler in several places in which it has been applied to gcc compiler. And refine the comment.
This commit is contained in:
parent
d6bba13e86
commit
4f5ad4dc12
|
@ -4339,10 +4339,12 @@ static V128FuncPtr invokeNative_V128 = (V128FuncPtr)(uintptr_t)invokeNative;
|
||||||
|| defined(BUILD_TARGET_RISCV64_LP64) */
|
|| defined(BUILD_TARGET_RISCV64_LP64) */
|
||||||
#endif /* end of defined(_WIN32) || defined(_WIN32_) */
|
#endif /* end of defined(_WIN32) || defined(_WIN32_) */
|
||||||
|
|
||||||
/* ASAN is not designed to work with custom stack unwind or other low-level \
|
/*
|
||||||
things. > Ignore a function that does some low-level magic. (e.g. walking \
|
* ASAN is not designed to work with custom stack unwind or other low-level
|
||||||
through the thread's stack bypassing the frame boundaries) */
|
* things. Ignore a function that does some low-level magic. (e.g. walking
|
||||||
#if defined(__GNUC__)
|
* through the thread's stack bypassing the frame boundaries)
|
||||||
|
*/
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
__attribute__((no_sanitize_address))
|
__attribute__((no_sanitize_address))
|
||||||
#endif
|
#endif
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -4009,10 +4009,12 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WASM_ENABLE_FAST_JIT != 0
|
#if WASM_ENABLE_FAST_JIT != 0
|
||||||
/* ASAN is not designed to work with custom stack unwind or other low-level \
|
/*
|
||||||
things. > Ignore a function that does some low-level magic. (e.g. walking \
|
* ASAN is not designed to work with custom stack unwind or other low-level
|
||||||
through the thread's stack bypassing the frame boundaries) */
|
* things. Ignore a function that does some low-level magic. (e.g. walking
|
||||||
#if defined(__GNUC__)
|
* through the thread's stack bypassing the frame boundaries)
|
||||||
|
*/
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
__attribute__((no_sanitize_address))
|
__attribute__((no_sanitize_address))
|
||||||
#endif
|
#endif
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -441,8 +441,14 @@ static os_thread_local_attribute bool thread_signal_inited = false;
|
||||||
/* The signal alternate stack base addr */
|
/* The signal alternate stack base addr */
|
||||||
static os_thread_local_attribute uint8 *sigalt_stack_base_addr;
|
static os_thread_local_attribute uint8 *sigalt_stack_base_addr;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ASAN is not designed to work with custom stack unwind or other low-level
|
||||||
|
* things. Ignore a function that does some low-level magic. (e.g. walking
|
||||||
|
* through the thread's stack bypassing the frame boundaries)
|
||||||
|
*/
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
#pragma clang optimize off
|
#pragma clang optimize off
|
||||||
|
__attribute__((no_sanitize_address))
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
#pragma GCC push_options
|
#pragma GCC push_options
|
||||||
#pragma GCC optimize("O0")
|
#pragma GCC optimize("O0")
|
||||||
|
@ -503,10 +509,12 @@ destroy_stack_guard_pages()
|
||||||
}
|
}
|
||||||
#endif /* end of WASM_DISABLE_STACK_HW_BOUND_CHECK == 0 */
|
#endif /* end of WASM_DISABLE_STACK_HW_BOUND_CHECK == 0 */
|
||||||
|
|
||||||
/* ASAN is not designed to work with custom stack unwind or other low-level \
|
/*
|
||||||
things. > Ignore a function that does some low-level magic. (e.g. walking \
|
* ASAN is not designed to work with custom stack unwind or other low-level
|
||||||
through the thread's stack bypassing the frame boundaries) */
|
* things. Ignore a function that does some low-level magic. (e.g. walking
|
||||||
#if defined(__GNUC__)
|
* through the thread's stack bypassing the frame boundaries)
|
||||||
|
*/
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
__attribute__((no_sanitize_address))
|
__attribute__((no_sanitize_address))
|
||||||
#endif
|
#endif
|
||||||
static void
|
static void
|
||||||
|
@ -523,10 +531,12 @@ mask_signals(int how)
|
||||||
static struct sigaction prev_sig_act_SIGSEGV;
|
static struct sigaction prev_sig_act_SIGSEGV;
|
||||||
static struct sigaction prev_sig_act_SIGBUS;
|
static struct sigaction prev_sig_act_SIGBUS;
|
||||||
|
|
||||||
/* ASAN is not designed to work with custom stack unwind or other low-level \
|
/*
|
||||||
things. > Ignore a function that does some low-level magic. (e.g. walking \
|
* ASAN is not designed to work with custom stack unwind or other low-level
|
||||||
through the thread's stack bypassing the frame boundaries) */
|
* things. Ignore a function that does some low-level magic. (e.g. walking
|
||||||
#if defined(__GNUC__)
|
* through the thread's stack bypassing the frame boundaries)
|
||||||
|
*/
|
||||||
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
__attribute__((no_sanitize_address))
|
__attribute__((no_sanitize_address))
|
||||||
#endif
|
#endif
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue
Block a user