File tree Expand file tree Collapse file tree
tests/fuzz/wasm-mutator-fuzz Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,7 +304,7 @@ def main():
304304 "default" : {
305305 "repo" : "https://github.com/llvm/llvm-project.git" ,
306306 "repo_ssh" : "git@github.com:llvm/llvm-project.git" ,
307- "branch" : "release/ 18.x " ,
307+ "branch" : "llvmorg- 18.1.8 " ,
308308 },
309309 }
310310
Original file line number Diff line number Diff line change @@ -172,23 +172,19 @@ set(IWASM_DIR ${REPO_ROOT_DIR}/core/iwasm)
172172# Global setting
173173add_compile_options (-Wno-unused-command-line-argument )
174174
175- # # Enable fuzzer
176- # add_definitions(-DWASM_ENABLE_FUZZ_TEST=1)
177- # # '-fsanitize=vptr' not allowed with '-fno-rtti
178- # # But, LLVM by default, disables the use of `rtti` in the compiler
179- # add_compile_options(-fsanitize=fuzzer -fno-sanitize=vptr)
180- # add_link_options(-fsanitize=fuzzer -fno-sanitize=vptr)
181-
182- # # Enable sanitizers if not in oss-fuzz environment
183- # set(CFLAGS_ENV $ENV{CFLAGS})
184- # string(FIND "${CFLAGS_ENV}" "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" FUZZ_POS)
185- # if (FUZZ_POS GREATER -1)
186- # set(IN_OSS_FUZZ 1)
187- # else()
188- # set(IN_OSS_FUZZ 0)
189- # endif()
190-
191- # include(${CMAKE_CURRENT_LIST_DIR}/../sanitizer_flags.cmake)
175+ # Enable sanitizers if not in oss-fuzz environment
176+ set (CFLAGS_ENV $ENV{CFLAGS} )
177+ string (FIND "${CFLAGS_ENV} " "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION" FUZZ_POS)
178+ if (FUZZ_POS GREATER -1)
179+ set (IN_OSS_FUZZ 1)
180+ else ()
181+ set (IN_OSS_FUZZ 0)
182+ endif ()
183+
184+ # Enable fuzzer
185+ add_definitions (-DWASM_ENABLE_FUZZ_TEST=1 )
186+
187+ include (${CMAKE_CURRENT_LIST_DIR} /sanitizer_flags.cmake )
192188
193189add_subdirectory (aot-compiler )
194190add_subdirectory (wasm-mutator )
Original file line number Diff line number Diff line change @@ -23,3 +23,8 @@ endif()
2323if (CMAKE_C_COMPILER_ID MATCHES ".*Clang" )
2424 add_compile_options (-fno-sanitize=unsigned-integer-overflow )
2525endif ()
26+
27+ # '-fsanitize=vptr' not allowed with '-fno-rtti
28+ # But, LLVM by default, disables the use of `rtti` in the compiler
29+ add_compile_options (-fsanitize=fuzzer -fno-sanitize=vptr )
30+ add_link_options (-fsanitize=fuzzer -fno-sanitize=vptr )
You can’t perform that action at this time.
0 commit comments