aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-02-27docs: update readme to inform about commercial offeringupstream-mainJochen
2024-02-21build: update toolchains_llvm dependencyNorbert Schneider
2024-01-29Remove cifuzz referencesNorbert Schneider
2023-11-06driver: Fix startup crash when fuzzing native libraries (#883)Fabian Meumertzheim
driver: Fix startup crashes when fuzzing native libraries Fixes a JVM crash with the following frame while fuzzing native libraries: ``` [libstdc++.so.6+0x13bf8a] std::ostream::sentry::sentry(std::ostream&)+0x1a ```
2023-10-18tests: Restore live output of `java_fuzz_target_test`Fabian Meumertzheim
This broke in 55eb18b20953bea99fa1a5f55668740686f448b3.
2023-10-18BREAKING: junit: Use default element name in `@DictionaryEntries`Fabian Meumertzheim
This allows for cleaner syntax (`@DictionaryEntries({"a", "b"})` and avoids introducing yet another term (`token`).
2023-10-18junit: Automatically escape `@DictionaryEntries`Fabian Meumertzheim
2023-10-18BREAKING: junit: Use relative resource paths with `@DictionaryFile`Fabian Meumertzheim
The resource path is now interpreted relative to the class using the annotation, which is more idiomatic. This does require changing `com/example/Foo` to `/com/example/Foo` if an absolute path is desired.
2023-10-18tests: Extract common base class out of lifecycle testsFabian Meumertzheim
2023-10-18tests: Verify emitted warnings and errorsFabian Meumertzheim
2023-10-18all: Make IDE and CLI executions of JUnit fuzz tests more consistentFabian Meumertzheim
Previously, IDE executions of JUnit fuzz tests registered a `findingHandler` in `FuzzTargetRunner` whereas CLI executions did not. This lead to inconsistent behavior that was hard to reason about and a lack of feature parity between the two modes (e.g. `--keep_going` was only supported on the CLI). Instead, we now use a `findingHandler` to report the last, "fatal", finding in structured form to `FuzzTestExecutor`, with all other findings having their stack traces printed. `JUnitRunner` now handles findings from lifecycle methods correctly, including for the exit code.
2023-10-18mutator: Remove invalid inputs checkFabian Meumertzheim
The check generates a warning for essentially all our tests and doesn't seem to be easy to make more precise.
2023-10-18junit: Make test instance handling in per-execution mode more realisticFabian Meumertzheim
Each execution uses its own dedicated test class instance and also runs preprocessors. See the comment in `JUnitLifecycleMethodsInvoker#beforeFirstExecution` for an explanation of how this still falls short of emulating default JUnit behavior.
2023-10-18driver: Fix condition for calling `dumpReproducer`Fabian Meumertzheim
Previously, `dumpReproducer` was called for `@FuzzTest`s using Autofuzz, which is implemented as a static fuzz target method.
2023-10-18mutation: Simplify ArgumentsMutator by not storing the instanceFabian Meumertzheim
2023-10-18tests: Make JUnit lifecycle tests more preciseFabian Meumertzheim
We also track the instance on which a given method is invoked and verify that the `ExtensionContext` contains consistent information. This prepares for future changes to `Lifecycle.PER_EXECUTION`.
2023-10-18tests: Fix error message on an unexpected findingFabian Meumertzheim
2023-10-18tests: Remove redundant `verify_crash_reproducer = False` linesFabian Meumertzheim
If a target doesn't expect a finding, it doesn't have to disable this check manually.
2023-10-17More clearly document that only a single fuzz test is fuzzed per runFabian Meumertzheim
Work towards #599
2023-10-17docs: Recommend using `--disk_cache` in `CONTRIBUTING.md`Fabian Meumertzheim
2023-10-17ci: Disable the disk cacheFabian Meumertzheim
The disk cache was based on GitHub Action's immutable caches with a static cache and thus likely contained outdated results. It also results in spurious persistent failures on Windows such as: ``` ERROR: D:/a/jazzer/jazzer/deploy/BUILD.bazel:65:12: MergeJars deploy/jazzer-junit-project-src.jar failed: Exec failed due to IOException: 2 errors during bulk transfer: java.io.IOException: D:/a/jazzer/jazzer/%HOME%/bazel-disk/cas/44/44e1a1356c8b7423f3b6c8cef5d75fdd6bf193f03d7bc416f81a3c3cd86166a2 (Permission denied) java.io.IOException: D:/a/jazzer/jazzer/%HOME%/bazel-disk/cas/44/44e1a1356c8b7423f3b6c8cef5d75fdd6bf193f03d7bc416f81a3c3cd86166a2 (Permission denied) ``` Since we already use a remote cache, disabling the disk cache should not harm build times. In fact, the CI Sense jobs didn't even use the cache, but paid the cost for setting it up.
2023-10-17Also scan `lib/` and `ext/` `.jar`s with ClassGraphFabian Meumertzheim
At least for JDK/JRE 8, these directories contain `.jar` files with classes that may need to be instrumented.
2023-10-17Deployment: Update public key for signing maven packagesRobert Czechowski
2023-10-17Add FuzzTest dictionary support (#862)Brian Lewis
Add support for dictionaries in fuzz tests This adds dictionary support to JUnit fuzz tests via 2 annotations: WithDictionary and WithDictionaryFile that allow dictionaries to be specified either as static arrays of tokens or by referring to a dictionary file. Multiple instances of both annotations are allowed and all values will be merged in the dictionary given to libfuzzer. --------- Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
2023-10-16deps: Update Java dependenciesFabian Meumertzheim
2023-10-16bazel: Silence Protobuf and zlib compilation warningsFabian Meumertzheim
2023-10-16bazel: Update Bazel and remove flipped flagsFabian Meumertzheim
2023-10-16bazel: Update rulesets and remove upstreamed patchesFabian Meumertzheim
2023-10-16tests: Do not retain values in StressTestFabian Meumertzheim
StressTest required a lot of memory since it collected all `init` and `mutate` return values in a list. Instead, cross values off of a short list for "contains" type checks and use `hashCode()` to stand in for the actual value in statistical tests. Verified locally that the test now passes with `--jvmopt=-Xmx512M`.
2023-09-28mutation: Use `hasFixedSize` in `sizeInClosedRange`Fabian Meumertzheim
The benchmarks in `//tests/benchmarks` show that biasing the size of subsets of collections of primitives chosen by the mutator to be small results in much worse performance than a comparable unstructured fuzz test. Before this change, 11 out of 15 runs time out with no run limit, the other ones result in: ``` { "values": [ 11143, 28128, 581194, 4229980 ], "minimum": 11143, "maximum": 4229980, "average": 1212611.25, "median": 304661 } ``` After this change, all runs pass within a limit of 35,000 runs: ``` { "values": [ 887, 1557, 1889, 2557, 3023, 3346, 3517, 6075, 6613, 7991, 9578, 10850, 15583, 23638, 31046 ], "minimum": 887, "maximum": 31046, "average": 8543.333333333334, "median": 6075 } ``` ExperimentalMutatorComplexProtoFuzzer now takes more runs on Linux, but still less than on other platforms, which seems to indicate that the Linux seed just happened to be a lucky choice.
2023-09-28mutation: Pass `hasFixedSize` into `closedRangeBiasedTowardsSmall`Fabian Meumertzheim
This is a pure refactoring, the value will be used in the follow-up commit. The function is renamed to reflect that it may no longer return a biased value.
2023-09-28mutation: Add `hasFixedSize()` method to all mutatorsFabian Meumertzheim
This function will be used in a follow-up change to allow collection mutators to decide how "aggressive" they should be when mutating and resizing the collection.
2023-09-28tests: Reduce numbers of `init` and `mutate` calls in `StressTest`Fabian Meumertzheim
This pepares for follow-up changes which will roughly double the runtime of this test.
2023-09-20deploy: Simplify instructions for staging repositoriesFabian Meumertzheim
2023-09-20deploy: Inject Jazzer version via a flagFabian Meumertzheim
This removes the need to have a "version bump" commit before every release.
2023-09-20deploy: Fix `jazzer_standalone.jar` not being executableFabian Meumertzheim
This was missed in #838.
2023-09-20deploy: Bump version to 0.21.0Fabian Meumertzheim
2023-09-20junit: Only create `.cifuzz-corpus` if it is the generated corpusFabian Meumertzheim
If users add custom corpus directories, the first of those will be used as the generated corpus instead of the default `.cifuzz-corpus` directory. We now no longer create this directory if it is going to stay empty because it isn't used as the generated corpus directory.
2023-09-20ci: Replace JDK 17 with JDK 21 in pipelinesFabian Meumertzheim
2023-09-18Docs: Update CONTRIBUTING.md with new release instructionsRobert Czechowski
2023-09-18Release script: Deploy docs on releaseRobert Czechowski
2023-09-18Deploy script: Pass sources and javadoc jars as dictionary parameter to ↵Robert Czechowski
rules_jvm_external/maven:MavenPublisher This is necessary because of https://github.com/bazelbuild/rules_jvm_external/commit/5e9a6d3deafd234b53f40231709487cc7534824b which is included since https://github.com/CodeIntelligenceTesting/jazzer/commit/f99c2ffbaa263be18550e4bd898528c0c9d9189f
2023-09-18Deploy script: Pass sensitive information to ↵Robert Czechowski
rules_jvm_external/maven:MavenPublisher as envvars This is necessary because of https://github.com/bazelbuild/rules_jvm_external/commit/c960c88affa59b9d380a0d56e63a8a27a1a6113 which is included since https://github.com/CodeIntelligenceTesting/jazzer/commit/f99c2ffbaa263be18550e4bd898528c0c9d9189f
2023-09-18CI: Update release pipeline to deploy full releasesRobert Czechowski
This splits up the release pipeline into a pre-release pipeline and a release pipeline. The prerelease pipeline, in addition to creating the release builds also: - Uploads the artifacts to maven - Creates a draft release on Github The release pipeline now: - Runs as soon as the draft release on Github is released - Pushes the docker images to Docker Hub
2023-09-15BREAKING: junit: Set default lifecycle to `PER_TEST`Fabian Meumertzheim
This is a temporary reversal of the breaking change in 1ca007d04325014d4fa0e48d239745f3ecc8fbcf until we support `TestInstancePostProcessor`s.
2023-09-15junit: Make fuzz test lifecycle mode configurableFabian Meumertzheim
2023-09-15junit: Make internal classes package-privateFabian Meumertzheim
This removes the classes from generated javadocs.
2023-09-12deploy: Simplify javadoc generationFabian Meumertzheim
By using a new `javadoc` attribute, we can build the javadocs offline and in a single step.
2023-09-12bazel: Update rules_jvm_external to latest HEADFabian Meumertzheim
Our patches have been merged.
2023-09-11Allow `@FuzzTest` to be applied to annotationsFabian Meumertzheim
This can be used to create custom reusable variants of `@FuzzTest`.