Commit Graph

9 Commits

Author SHA1 Message Date
Fabian Meumertzheim f053e761ec
[infra] Allow shell script targets for all languages (#5802)
For proper support of Bazel's runfiles tree, a shell script wrapper is
also needed for C++ targets, see
https://github.com/bazelbuild/rules_fuzzing/pull/149.

This commit allows shell script fuzz targets for all languages. This
also helps to consolidate the various fuzz target checks in OSS-Fuzz
by removing a dependence on fuzzing_language.
2021-05-24 09:16:32 -07:00
Caolán McNamara 0f02ca5a56
retry sequentially if multiprocessing do_bad_build_check detects fail… (#5578)
* retry sequentially if multiprocessing do_bad_build_check detects failures

https://github.com/google/oss-fuzz/issues/5441

The error seen in the build log is:

Whoops, the target binary crashed suddenly, before receiving any input
from the fuzzer!

suggesting that the fuzzer crashed before it got to do anything.
Debugging locally what I tend to see is that

a) in src/afl-forkserver.c afl_fsrv_start the read_s32_timed call
returns 0 and that triggers kill(fsrv->fsrv_pid, fsrv->kill_signal);
(SIGKILL)
b) read_s32_timed returns 0 because *stop_soon_p is non-zero at
restart_read:
c) *stop_soon_p becomes non-zero in handle_stop_sig of
src/afl-fuzz-init.c due to receiving SIGINT
d) that SIGINT is sent by the timeout script used in bad_build_check so
it is that "outer" timeout process which is sending SIGINT which then
triggers afl-forkserver's internal SIGKILL to kill the process

I get improved results if I retry the killed off fuzzers sequentially

* Remove unneeded semicolons to fix presubmit

Co-authored-by: Abhishek Arya <inferno@chromium.org>
2021-04-05 12:50:15 -07:00
Fabian Meumertzheim 481280c650
[jazzer] Adapt infra scripting to JVM fuzz targets (#5176)
compile, bad_build_check, and presubmit.py require small tweaks to
support JVM fuzz targets, most of which are similar to those required
for Python. The following additional changes are required:

* Since the Jazzer driver binary already links in libFuzzer, it should
  not be built as a static library.
* It is not clear how to do architecture checks as JVM fuzz targets can
  load their native dependencies dynamically at runtime. For now, the
  check is disabled.
* The Jazzer binaries are moved into $OUT and need to be skipped over in
  find_fuzz_targets.
2021-02-16 07:06:58 -08:00
Abhishek Arya 01ebe8e15f
Don't run test_all on llvm-symbolizer for black box fuzzer projects. (#4873) 2020-12-19 08:20:29 -08:00
jonathanmetzman 2a1194c939
Improve CIFuzz tests (#4868)
1. Fix problem where permissions were being changed to root by non-root test (test was doing this by invoking test_all.py within docker).
2. Mark tests as integration tests so that cifuzz_test.py can be run in a reasonable amount of time.
3. Prevent some unittests from polluting source repo.
4. Add .venv to .gitignore
5. Rename test_test_all.py to the correctly formatted name "test_all_test.py"
2020-12-18 10:37:56 -08:00
Abhishek Arya 6718fb8bd6
Fix broken blackbox fuzzer projects. (#4865)
* Fix broken blackbox fuzzer projects.

Regression from
https://github.com/google/oss-fuzz/pull/4769/files

* Fix indent.
2020-12-17 16:29:11 -08:00
jonathanmetzman a24cebec02
Make test_all.py return nonzero when there are no fuzzers. (#4796)
Make test_all.py return nonzero when there are no fuzzers.

This matches the previous behavior.
Fixes https://github.com/google/oss-fuzz/issues/4795
2020-12-07 10:16:31 -08:00
jonathanmetzman b1c77d1fa2
[test_all] Fix issue where CIFuzz may use an empty string for ALLOWED_BROKEN_TARGETS_PERCENTAGE (#4778) 2020-12-03 13:30:03 -08:00
jonathanmetzman c8d2319aa8
[test_all] Rewrite in Python (#4769)
Rewrite test_all in python.
Bash is quite annoying to write and test.
One issue with bash is it is even worse than Python for parallelism (which may be causing #4707).
Rewrite test_all in python and optimize base-runner/Dockerfile for fast development.
Also, combine some docker layers.
2020-12-03 12:52:34 -08:00