mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 02:27:35 +00:00
Lagom: Add fuzz testing for LibJS using libFuzzer (#1692)
Note: clang only (see https://llvm.org/docs/LibFuzzer.html) - add FuzzJs which will run the LibJS parser on random javascript inputs - added a basic dictionary of javascript tokens To use fuzzer: CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake -DENABLE_FUZZER_SANITIZER=1 .. Fuzzers/FuzzJs -dict=../Fuzzers/FuzzJs.dict
This commit is contained in:
parent
e91cb83a23
commit
7291d5c86f
4 changed files with 140 additions and 0 deletions
9
Meta/Lagom/Fuzzers/CMakeLists.txt
Normal file
9
Meta/Lagom/Fuzzers/CMakeLists.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
add_executable(FuzzJs FuzzJs.cpp)
|
||||
target_compile_options(FuzzJs
|
||||
PRIVATE $<$<C_COMPILER_ID:Clang>:-g -O1 -fsanitize=fuzzer>
|
||||
)
|
||||
|
||||
target_link_libraries(FuzzJs
|
||||
PUBLIC lagom
|
||||
PRIVATE $<$<C_COMPILER_ID:Clang>:-fsanitize=fuzzer>
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue