Commit Graph

12 Commits

Author SHA1 Message Date
Fabian Meumertzheim 87c80b3a8b
[java-example] Disable project (#5962)
Coverage builds succeed and every expected finding has been found.
2021-06-23 07:49:14 -07:00
Fabian Meumertzheim 1a77d6c33f
[java-example] Build native library in subdirectory (#5959)
Top-level executables are taken to be fuzz targets by the coverage
script.
2021-06-22 07:14:11 -07:00
Fabian Meumertzheim 226c89d5d6
[java-example] Fix UBSan options (#5910)
The JVM needs to register custom SEGV handlers.
2021-06-11 05:13:10 -07:00
Fabian Meumertzheim 73d78b8879
[infra][jvm] Add Jazzer UBSan support (#5898)
* [infra][jvm] Add Jazzer UBSan support

* [java-example] Reenable and plant UB

* [docs] Mention support for Java UBSan in docs

Also adds a link to the java-example build.sh to the docs.
2021-06-10 07:57:42 -07:00
Fabian Meumertzheim 10e888b561
[all] Make fuzz targets world executable (#5751)
Making fuzz targets only user executable as the root user makes them
non-executable outside the container, e.g. in the oss-fuzz/build/ dir.
2021-05-12 07:03:21 -07:00
Fabian Meumertzheim 431b5c2f60
Disable java-example (#5653)
`java-example` has produced all the expected findings and there are now sufficiently many Java projects with status badges that build failures caused by issues with Jazzer would be noticed quickly.
2021-04-22 06:41:58 -07:00
Fabian Meumertzheim 4f13045ec0
[java-example] Trigger new native finding (#5597)
Java native libraries should now be fuzzed correctly, but the current crash is still reported as flaky due to the multiple fixes required to make it work.

This commit should trigger a clean new finding.
2021-04-10 07:31:35 -07:00
Fabian Meumertzheim 947169dc86
[java-example] Speculative fix for JVM segfault crashes (#5554)
The JVM uses custom SIGSEGV handlers, which leads to fuzzer crashes on
ClusterFuzz when running with ASAN likely due to the
allow_user_segv_handler=1 default on the platform.
2021-04-01 09:04:22 -07:00
jonathanmetzman aab2e82b4a
[jazzer][java-example] Fix native library loading. (#5262)
Prior to this change, native library loading failed for
two reasons:
1. Loading from current working directory instead of the fuzzer's
directory.
2. Using ASAN_OPTIONS=handle_segv=2.

Fix these issues by doing the following.
1. Adding the fuzzer's directory to LD_LIBRARY_PATH instead of "."
2. Specifying handle_segv=1 in ASAN_OPTIONS.

Related: https://github.com/google/oss-fuzz/issues/5178
2021-02-26 18:22:32 +00:00
Fabian Meumertzheim e23e06fd12
[jazzer] Migrate projects to new void fuzzerTestOneInput (#5251)
Jazzer has made fuzzerTestOneInput return void instead of boolean.
This commit adapts the existing Jazzer fuzz targets to this change.

Previously, returning true from a fuzz target would be recorded as a
crash. However, since there is no stack trace in that case, such crashes
cause issues with deduplication. Additionally, the behavior is easy to
replicate with assert or a an if with a throw statement.
2021-02-24 08:33:58 -08:00
Fabian Meumertzheim 12d7371cf6
[java-example] Don't assume that fuzzer is run from its directory (#5219)
The same speculative fix as in #5217.

The current working directory "." should have no reason to be in the
classpath if it is not equal to "$this_dir", hence it is removed.
2021-02-19 06:29:46 -08:00
Fabian Meumertzheim 9ca45293b3
[jazzer] Add java-example project (#5216)
The java-example project does not pull in any external dependencies, but
rather consists of three basic Java fuzzers that hit a synthetic bug
after a few seconds. The project can be used to verify that ClusterFuzz
correctly handles JVM fuzz targets.

* ExampleFuzzer fails with an assertion.
* ExampleValueProfileFuzzer fails with an exception after a few seconds,
  but only if running in value profile mode.
* ExampleFuzzerNative fails with an ASan report.
2021-02-18 17:53:50 -08:00