Discover Packages
github.com/genjidb/genji/fuzz
package
module
Version:
v0.0.0-...-3e5e6e1
Opens a new window with list of versions in this module.
Published: May 11, 2021
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Fuzz Tests
Fuzzing Genji with go-fuzz .
Quick Start
Install go-fuzz
go install github.com/dvyukov/go-fuzz/go-fuzz-build github.com/dvyukov/go-fuzz/go-fuzz
Download the initial corpus
git clone https://github.com/genjidb/go-fuzz-corpus testdata/fuzz
Build the test program with necessary instrumentation
go-fuzz-build -func FuzzParseQuery
This will produce fuzz-fuzz.zip archive.
Run the fuzzer.
go-fuzz -workdir=testdata/fuzz/FuzzParseQuery
The results will be written to testdata/fuzz/FuzzParseQuery
.
Note that go-fuzz runs forever until manually stopped.
Example output:
…
2020/10/14 12:03:58 workers: 2, corpus: 166 (13s ago), crashers: 2, restarts: 1/9663, execs: 1526845 (16418/sec), cover: 924, uptime: 1m33s
…
Here, corpus
is number of interesting inputs the fuzzer has discovered, and crashers
is number of discovered bugs (check out testdata/fuzz/FuzzParseQuery/crashers
dir).
See README file from go-fuzz for more information.
Expand ▾
Collapse ▴
Documentation
¶
func FuzzParseQuery(data []byte ) int
Source Files
¶
Click to show internal directories.
Click to hide internal directories.