From c10da44df24ff40ebdfb128f431db4f18847a0e1 Mon Sep 17 00:00:00 2001 From: hulkoba Date: Wed, 13 Dec 2023 10:55:40 +0100 Subject: [PATCH] docs(fuzz): add sync explaination --- test/fuzz/readme.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/fuzz/readme.md b/test/fuzz/readme.md index 01d0556e..969b3ee1 100644 --- a/test/fuzz/readme.md +++ b/test/fuzz/readme.md @@ -45,6 +45,13 @@ TARGET=createMessageBinary npm run fuzz-coverage The coverage reports can be found in `test/fuzz/coverage`. +_Note:_ The output will tell you that using `--sync` might be useful: +> Exclusively observed synchronous return values from fuzzed function. Fuzzing in synchronous mode seems beneficial! +To enable it, append a `--sync` to your Jazzer.js invocation. + +But, [be careful](https://github.com/CodeIntelligenceTesting/jazzer.js/blob/main/docs/fuzz-targets.md#synchronous-execution). +It **may only be used for entirely synchronous code** and it is not fully compatible with callbacks, that are used in the tests. + ## The fuzz target module All functions that need to be fuzz-tested are here, at the `test/fuzz/` directory.