-
Notifications
You must be signed in to change notification settings - Fork 140
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 FuzzedDataProviderImpl #834
Conversation
e5640aa
to
9324161
Compare
...fuzz/src/test/java/com/code_intelligence/selffuzz/driver/FuzzedDataProviderImplFuzzTest.java
Outdated
Show resolved
Hide resolved
...fuzz/src/test/java/com/code_intelligence/selffuzz/driver/FuzzedDataProviderImplFuzzTest.java
Outdated
Show resolved
Hide resolved
...fuzz/src/test/java/com/code_intelligence/selffuzz/driver/FuzzedDataProviderImplFuzzTest.java
Outdated
Show resolved
Hide resolved
...fuzz/src/test/java/com/code_intelligence/selffuzz/driver/FuzzedDataProviderImplFuzzTest.java
Outdated
Show resolved
Hide resolved
...fuzz/src/test/java/com/code_intelligence/selffuzz/driver/FuzzedDataProviderImplFuzzTest.java
Outdated
Show resolved
Hide resolved
...lligence/jazzer/driver/com_code_intelligence_selffuzz_jazzer_driver_FuzzedDataProviderImpl.h
Outdated
Show resolved
Hide resolved
...lligence/jazzer/driver/com_code_intelligence_selffuzz_jazzer_driver_FuzzedDataProviderImpl.h
Outdated
Show resolved
Hide resolved
|
|
src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider.cpp
Show resolved
Hide resolved
src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider.cpp
Outdated
Show resolved
Hide resolved
We shouldn't include this in the current PR, but I found the following patch to work locally in cifuzz. I do get coverage feedback from the native methods backing It runs with diff --git a/.github/workflows/fuzzing-featured.yaml b/.github/workflows/fuzzing-featured.yaml
index a5680d5b..6c8c9fb8 100644
--- a/.github/workflows/fuzzing-featured.yaml
+++ b/.github/workflows/fuzzing-featured.yaml
@@ -57,7 +57,10 @@ jobs:
shell: bash
- id: build-jazzer
name: Build Jazzer deps
- run: cd $CHECKOUT_DIR && bazel build //deploy:jazzer-junit-project //deploy:jazzer-project //deploy:jazzer-api-project //selffuzz:jazzer_selffuzz //selffuzz:jazzer_api_selffuzz
+ run: |
+ cd $CHECKOUT_DIR
+ bazel build //deploy:jazzer-junit-project //deploy:jazzer-project //deploy:jazzer-api-project
+ bazel build --fsanitize=fuzzer-no-link //selffuzz:jazzer_selffuzz //selffuzz:jazzer_api_selffuzz
- id: build-fuzzers
name: Build Fuzzers
diff --git a/.github/workflows/fuzzing.yaml b/.github/workflows/fuzzing.yaml
index 13a8ef5c..10306606 100644
--- a/.github/workflows/fuzzing.yaml
+++ b/.github/workflows/fuzzing.yaml
@@ -49,7 +49,10 @@ jobs:
shell: bash
- id: build-jazzer
name: Build Jazzer deps
- run: cd $CHECKOUT_DIR && bazel build //deploy:jazzer-junit-project //deploy:jazzer-project //deploy:jazzer-api-project //selffuzz:jazzer_selffuzz //selffuzz:jazzer_api_selffuzz
+ run: |
+ cd $CHECKOUT_DIR
+ bazel build //deploy:jazzer-junit-project //deploy:jazzer-project //deploy:jazzer-api-project
+ bazel build --copt=-fsanitize=fuzzer-no-link //selffuzz:jazzer_selffuzz //selffuzz:jazzer_api_selffuzz
- id: build-fuzzers
name: Build Fuzzers
diff --git a/selffuzz/cifuzz.yaml b/selffuzz/cifuzz.yaml
index 95f3af76..b4f61d55 100644
--- a/selffuzz/cifuzz.yaml
+++ b/selffuzz/cifuzz.yaml
@@ -38,6 +38,7 @@
## See https://llvm.org/docs/LibFuzzer.html#options
engine-args:
- --experimental_mutator
+ - --native
## Maximum time to run fuzz tests. The default is to run indefinitely.
#timeout: 30m
|
src/main/native/com/code_intelligence/jazzer/driver/fuzzed_data_provider.cpp
Outdated
Show resolved
Hide resolved
Looks good, thanks! I can't approve again as that results in a 500 from GitHub, just assume I did. |
e74e98d
to
95b2212
Compare
This adds a very large fuzz test for the
FuzzedDataProviderImpl
and modifies buildingfuzzed_data_provider.cpp
to make it possible for the normal and shadedFuzzedDataProvider
to at least load properly by duplicating the selffuzz symbols intofuzzed_data_provider.cpp
manually.I also removed the segfault fix I did just to make sure our tooling can catch it again.