mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-07 12:16:24 +00:00
bypass vptr santizier (#4231)
LLVM, by default, disables the use of C++'s built-in Run-Time Type Information. This decision is primarily driven by concerns about code size and efficiency. But '-fsanitize=vptr' not allowed with '-fno-rtti'.
This commit is contained in:
parent
791e60f533
commit
1d39b9c834
|
@ -90,8 +90,10 @@ add_compile_options(-Wno-unused-command-line-argument)
|
|||
|
||||
# Enable fuzzer
|
||||
add_definitions(-DWASM_ENABLE_FUZZ_TEST=1)
|
||||
add_compile_options(-fsanitize=fuzzer)
|
||||
add_link_options(-fsanitize=fuzzer)
|
||||
# '-fsanitize=vptr' not allowed with '-fno-rtti
|
||||
# But, LLVM by default, disables the use of `rtti` in the compiler
|
||||
add_compile_options(-fsanitize=fuzzer -fno-sanitize=vptr)
|
||||
add_link_options(-fsanitize=fuzzer -fno-sanitize=vptr)
|
||||
|
||||
# Enable sanitizers if not in oss-fuzz environment
|
||||
set(CFLAGS_ENV $ENV{CFLAGS})
|
||||
|
|
Loading…
Reference in New Issue
Block a user