fuzzing test and detect the memmove error (#688)

* fuzzing

* add an additional random walk test
This commit is contained in:
Schrodinger ZHU Yifan
2024-11-19 08:48:18 -05:00
committed by GitHub
parent 01885f5a04
commit 0b53b9301e
3 changed files with 225 additions and 0 deletions

22
fuzzing/CMakeLists.txt Normal file
View File

@@ -0,0 +1,22 @@
include(FetchContent)
FetchContent_Declare(
fuzztest
GIT_REPOSITORY https://github.com/google/fuzztest.git
GIT_TAG 2024-10-28
)
FetchContent_MakeAvailable(fuzztest)
enable_testing()
fuzztest_setup_fuzzing_flags()
add_executable(
snmalloc-fuzzer
snmalloc-fuzzer.cpp
)
target_link_libraries(snmalloc-fuzzer PRIVATE snmalloc)
target_compile_options(snmalloc-fuzzer PRIVATE -fsanitize=address -DADDRESS_SANITIZER)
link_fuzztest(snmalloc-fuzzer)