fuzz: link libfuzzer engine to fuzz with bazel!#7805
fuzz: link libfuzzer engine to fuzz with bazel!#7805lizan merged 11 commits intoenvoyproxy:masterfrom
Conversation
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
|
/retest |
|
🔨 rebuilding |
htuch
left a comment
There was a problem hiding this comment.
This is super awesome, nice to see that it's relatively few lines of code and not too much hackery.
Can you update https://github.com/envoyproxy/envoy/blob/master/test/fuzz/README.md with a section on how to run this on CLI. I think the best guidance is to tell folks to do something like:
bazel run //test/common/common:base64_fuzz_test_driver --config asan-fuzzer
/wait
Signed-off-by: Asra Ali <asraa@google.com>
|
/retest |
|
🔨 rebuilding |
htuch
left a comment
There was a problem hiding this comment.
This is huge improvement to fuzzing development productivity, LGTM. I like the ability to work directly with corpus.
@yevgenypats this is probably the right basis for doing fuzzing outside of oss-fuzz when working directly under CI.
|
This is awesome, I'll rebase my PR on top of this one, once it is merged!. |
|
/retest |
|
🔨 rebuilding |
|
looks like one of tests here fails. maybe it's out of memory? |
|
Can you try applying this? I think it will fix clang_tidy: Also merge master to pick up CI changes. |
…utefuzz Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
Signed-off-by: Asra Ali <asraa@google.com>
|
This is still gets killed due to oom. I suspect that you need to add |
Signed-off-by: Asra Ali <asraa@google.com>
|
Thank you! Yes, let's see. I'm not sure what the implications are later, but I did add the jobs flag to see what happens. |
|
horray! it worked:) #why_bazel_spins_up_200_workers_by_default:) |
|
Can you try to fix the jobs number to env ${NUM_CPUS} (which is set to 8 in CI)? @yevgenypats bazel automatically spins up job to the number of CPU cores, which ignores cgroup, so in a docker environment in large host, it spins job more than cgroup restriction. |
Signed-off-by: Asra Ali <asraa@google.com>
|
Thanks everyone. clang-tidy runs with NUM_CPUS jobs now. |
|
horray! lets merge! |
This makes a new config "asan-fuzzer" that links to the libfuzzer engine.
To run a fuzz target with asan and libfuzzer, do
bazel build --config=asan-fuzzer test/common/router:route_fuzz_test_with_libfuzzer --config=asan-fuzzer
bazel-bin/test/common/router/route_fuzz_test_driver test/common/router/route_corpus -runs=-1
(-runs=-1 for indefinite runs, -runs=100 for bounded).
Testing: works locally
Risk: Low