diff options
author | Fabian Meumertzheim <meumertzheim@code-intelligence.com> | 2021-05-30 13:14:45 +0200 |
---|---|---|
committer | Fabian Meumertzheim <fabian@meumertzhe.im> | 2021-05-30 14:53:49 +0200 |
commit | 8902a818e1c9e60d1e13c73a73723c1ed77839f0 (patch) | |
tree | 8d623f52b6bd1dfb04603a89ea0582ec87f71f7f /examples | |
parent | e3b144566eb3fbb3d38affa588e269b5ca74db95 (diff) | |
download | jazzer-api-8902a818e1c9e60d1e13c73a73723c1ed77839f0.tar.gz |
Let ExampleFuzzerWithNative crash with ASan report
Diffstat (limited to 'examples')
-rw-r--r-- | examples/src/main/native/com_example_ExampleFuzzerWithNative.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/src/main/native/com_example_ExampleFuzzerWithNative.cpp b/examples/src/main/native/com_example_ExampleFuzzerWithNative.cpp index 04329acc..434c3d5b 100644 --- a/examples/src/main/native/com_example_ExampleFuzzerWithNative.cpp +++ b/examples/src/main/native/com_example_ExampleFuzzerWithNative.cpp @@ -18,11 +18,11 @@ // simple function containing a crash that requires coverage and string compare // instrumentation for the fuzzer to find -void parseInternal(const std::string &input) { +__attribute__((optnone)) void parseInternal(const std::string &input) { if (input[0] == 'a' && input[1] == 'b' && input[5] == 'c') { if (input.find("secret_in_native_library") != std::string::npos) { // BOOM - *(char *)1 = 2; + [[maybe_unused]] char foo = input[input.size() + 2]; } } } |