-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
993b1d0
commit 61a614f
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
libFuzzer support for QuickJS | ||
============================= | ||
|
||
Build QuickJS with libFuzzer support as follows: | ||
|
||
CONFIG_CLANG=y make libfuzzer | ||
|
||
This can be extended with sanitizer support to improve efficacy: | ||
|
||
CONFIG_CLANG=y CONFIG_ASAN=y make libfuzzer | ||
|
||
|
||
Currently, there are three fuzzing targets defined: fuzz_eval, fuzz_compile and fuzz_regexp. | ||
The above build command will produce an executable binary for each of them, which can be | ||
simply executed as: | ||
|
||
./fuzz_eval | ||
|
||
or with an initial corpus: | ||
|
||
./fuzz_compile corpus_dir/ | ||
|
||
or with a predefined dictionary to improve its efficacy: | ||
|
||
./fuzz_eval -dict fuzz/fuzz.dict | ||
|
||
or with arbitrary CLI arguments provided by libFuzzer (https://llvm.org/docs/LibFuzzer.html). |