Improve libfuzz integration (#2916)
- Allow command line tools to build together with libfuzzer driver. Compile everything with `-fsanitize=fuzzer-no-link` to prevent linking in libfuzzers's `main` symbol in all executables (causing duplicate symbol errors in command line tools), and add `-fsanitize=fuzzer` to the libfuzzer driver only. - Make ASan optional when building with libfuzzer to allow the user to choose freely from available sanitizers (e.g., UBSan, MSan, HWASan). - Stabilize libfuzzer by resetting PRNG seed at every invocation. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
committed by
Robert Fancsik
parent
3953fee035
commit
8ee8bc2767
@@ -123,7 +123,7 @@ allocator is used.
|
||||
**To build with libfuzzer support**
|
||||
|
||||
```bash
|
||||
CC=clang python tools/build.py --libfuzzer=on --lto=off
|
||||
CC=clang python tools/build.py --libfuzzer=on --compile-flag=-fsanitize=address --lto=off
|
||||
```
|
||||
|
||||
Check the documentation of libfuzzer to get the runtime settings of the created fuzzer
|
||||
|
||||
Reference in New Issue
Block a user