Repository navigation
GH-54903: [C++][OSS-Fuzz fuzzing] Add new fuzzer targets json processing - #54886
arthurscchan wants to merge 2 commits into
Conversation
Signed-off-by: Arthur Chan <[email protected]>
|
Thanks for opening a pull request! This pull request has been automatically converted to a draft because its title doesn't match Arrow's required format. If this is not a minor PR, could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format? or After updating the title, you can mark the pull request as ready for review. See also: |
|
|
Signed-off-by: Arthur Chan <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Validation failures are silently treated as tolerated parse errors, preventing fuzz findings, and corpus generation unconditionally invokes a JSON executable that the default fuzzing preset does not build.
2 open issues
What changed in this PR
Adds a JSON reader fuzz target to Arrow’s C++ fuzzing infrastructure, expanding OSS-Fuzz coverage as part of GH-54903.
Changes:
- Exercises table, streaming, and single-object parsing with varied reader options and schemas.
- Adds a seed corpus generator and JSON mutation dictionary.
- Registers the target in CMake and adds JSON corpus packaging.
| File | Description |
|---|---|
cpp/src/arrow/json/generate_fuzz_corpus.cc |
Generates seeds combining option headers with JSON payloads. |
cpp/src/arrow/json/fuzz.cc |
Exercises JSON reader paths and validates successful results. |
cpp/src/arrow/json/CMakeLists.txt |
Registers the fuzzer and corpus generator. |
cpp/build-support/fuzzing/generate_corpuses.sh |
Generates and packages the JSON seed corpus. |
cpp/build-support/fuzzing/dicts/arrow-json-fuzz.dict |
Supplies JSON tokens for fuzz mutations. |
Review effort: Balanced
| # JSON reader | ||
|
|
||
| rm -rf "${CORPUS_DIR}" | ||
| "${OUT}/arrow-json-generate-fuzz-corpus" "${CORPUS_DIR}" |
| } | ||
| auto maybe_table = (*maybe_reader)->Read(); | ||
| if (maybe_table.ok()) { | ||
| MergeStatus((*maybe_table)->ValidateFull(), &st); |

This PR creates a new OSS-Fuzz fuzzer with corpora/dict targets json processing, together with google/oss-fuzz#16328 to enable a new fuzzer for project arrow. This PR is the 1st PR aiming to improve the overall fuzzing coverage and effectiveness of the arrow project, mentioned in #54903.