-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fuzz jq before releasing jq 1.7 #2669
Comments
@itchyny @emanuele6 @pkoppstein @owenthereal @leonid-s-usov @wtlangford @dtolnay et. al., if you could, please do this yourselves. I'll be running AFL myself starting at the current EDIT: I'm using https://github.com/dvyukov/go-fuzz-corpus/tree/master/json/corpus as well as what we already have in |
Fuzzing the language and builtins will require constructing a suitable test corpus. |
We have been fuzzing with OSS fuzz for a while, and jq 1.7 has been released; closing |
Procedure:
./configure CC=afl-gcc
(orafl-clang
)AFL_HARDEN=1 make
tests/torture/
, such as those from https://github.com/dvyukov/go-fuzz-corpus/tree/master/json/corpusmkdir ${objdir}/f
thenafl-fuzz -i ${srcdir}/tests/torture -o ${objdir}/f ${objdir}/jq .
, where$srcdir
is the directory with jq sources and$objdir
is where jq was builtOut-of-tree builds are supported, after all, e.g.,
git clone https://github.com/jqlang/jq && cd jq && srcdir=$(pwd) && mkdir build && autoreconf -fi && cd build && ../configure --srcdir="$srcdir" ... && ...
, wheresrcdir
is obvious andobjdir
is${srcdir}/build
.uniq crashes : 0
anduniq hangs : 0
in the AFL UIThe AFL UI looks like:
(this one has just started, as anyone can see).
The text was updated successfully, but these errors were encountered: