[CALCITE-7436] Test: Add high-coverage Jazzer fuzzing for Avatica core modules#300
[CALCITE-7436] Test: Add high-coverage Jazzer fuzzing for Avatica core modules#300vishalcoc44 wants to merge 6 commits intoapache:mainfrom
Conversation
|
Is there a JIRA issue for this feature? |
|
https://issues.apache.org/jira is the JIRA |
Alright, I'll file a ticket! |
CALCITE-7436 |
|
@julianhyde could you re trigger the workflow |
|
@vishalcoc44 , I've approved and trigged the workflows. |
the checks are good, once this PR is merged, I plan to submit a follow-up PR to the google/oss-fuzz repository to update the Avatica project configuration. This will enable the OSS-Fuzz infrastructure to build and run these new fuzzers directly from the upstream source, is that okay? Could I coordinate with you @F21 ? |
|
I am not familiar with OSS-Fuzz or Avatica internals, so I will defer the code review to other committers who have more knowledge in this area. I am, however, happy to coordinate and assist in any way to get this contribution merged. |
|
As a starter, can you please subscribe to the dev mailing list and start a discussion around these changes? See https://calcite.apache.org/community/#mailing-lists for instructions. It will bring more visibility to your proposed changes and allow input from community members. |
Hey, thanks for the info, i have raised a
alright, i subscribed to the mailing list. Since we are gonna have all the fuzzers in this repo, we should have a clfuzz workflow over here which will run fuzzers everytime someone pushes changes to this repo automatically. so the three new additions i've ,made to this existing commit are the two new fuzzer files and the workflow script. |
also i would like to add that the yaml file will fail for the time being until the changes i proposed are pushed to the google oss fuzz repo. |
Added Jazzer fuzzing to hit the actually important parts that had 0% OSS-Fuzz coverage:
JsonService + Jackson (nested/garbage JSON in & out)
ProtobufTranslationImpl (corrupted/truncated protobuf → POJO)
TypedValue factory (nasty type codes, overflows, nulls, scales)
AvaticaSite.get(...) (15+ JDBC/SQL types: DECIMAL precisions, timestamps, etc.)
Changes:
Added com.code_intelligence:jazzer-api to testImplementation (core/build.gradle.kts)
New fuzzers in core/src/test/java/org/apache/calcite/avatica/fuzz/
Results so far:
Coverage in RPC + type layers went from ~0% → thousands of lines
Catches bad payloads that could previously OOM, CPU spike, or throw ugly exceptions