Skip to content

Commit 1d39b9c

Browse files
authored
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'.
1 parent 791e60f commit 1d39b9c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/fuzz/wasm-mutator-fuzz/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ add_compile_options(-Wno-unused-command-line-argument)
9090

9191
# Enable fuzzer
9292
add_definitions(-DWASM_ENABLE_FUZZ_TEST=1)
93-
add_compile_options(-fsanitize=fuzzer)
94-
add_link_options(-fsanitize=fuzzer)
93+
# '-fsanitize=vptr' not allowed with '-fno-rtti
94+
# But, LLVM by default, disables the use of `rtti` in the compiler
95+
add_compile_options(-fsanitize=fuzzer -fno-sanitize=vptr)
96+
add_link_options(-fsanitize=fuzzer -fno-sanitize=vptr)
9597

9698
# Enable sanitizers if not in oss-fuzz environment
9799
set(CFLAGS_ENV $ENV{CFLAGS})

0 commit comments

Comments
 (0)