# fuzzer: write inputs to shared memory before running · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/d789f1e5cf60b063d5140c27926fd1a6b1654356)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: d789f1e5cf60b063d5140c27926fd1a6b1654356

Requested commit: d789f1e5cf60b063d5140c27926fd1a6b1654356

Commit: d789f1e5cf60b063d5140c27926fd1a6b1654356

Tree: b9323c389b8bac7930df6e30fa274fdfada1ff10

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
fuzzer: write inputs to shared memory before running

breaking change to the fuzz testing API; it now passes a type-safe
context parameter to the fuzz function.

libfuzzer is reworked to select inputs from the entire corpus.

I tested that it's roughly as good as it was before in that it can find
the panics in the simple examples, as well as achieve decent coverage on
the tokenizer fuzz test.

however I think the next step here will be figuring out why so many
points of interest are missing from the tokenizer in both Debug and
ReleaseSafe modes.

does not quite close #20803 yet since there are some more important
things to be done, such as opening the previous corpus, continuing
fuzzing after finding bugs, storing the length of the inputs, etc.

```

## Parents

- [31c132081857b126524ccd261da331c9b1bda856](https://git.cafe/gitcafe/zig/commit/31c132081857b126524ccd261da331c9b1bda856?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/d789f1e5cf60b063d5140c27926fd1a6b1654356?format=markdown)
