Skip to content

tests: OSS-Fuzz: Add new fuzzer targets otlp json process - #12357

Open
arthurscchan wants to merge 1 commit into
fluent:masterfrom
arthurscchan:new-fuzzer
Open

tests: OSS-Fuzz: Add new fuzzer targets otlp json process#12357
arthurscchan wants to merge 1 commit into
fluent:masterfrom
arthurscchan:new-fuzzer

Conversation

@arthurscchan

@arthurscchan arthurscchan commented Sep 1, 2026

Copy link
Copy Markdown

This PR creates a new OSS-Fuzz fuzzer targets otlp/json decoding process, together with the fix on OSS-Fuzz (google/oss-fuzz#16089) to prepare the corpora for this new fuzzer.

Summary by CodeRabbit

  • Tests
    • Added automated fuzz testing for OTLP/JSON log, metric, and trace decoding.
    • Expanded test target generation to include the new decoder fuzzing coverage.
    • Added safeguards for timeouts, allocation failures, and resource cleanup during testing.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 73ff31e8-93e5-4d2b-9fc9-67334047615e

📥 Commits

Reviewing files that changed from the base of the PR and between a31cf11 and c1a17a4.

📒 Files selected for processing (2)
  • tests/internal/fuzzers/CMakeLists.txt
  • tests/internal/fuzzers/otlp_json_fuzzer.c

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The pull request adds an OTLP/JSON fuzz target for logs, metrics, and traces. It registers the target in the existing CMake fuzzer list and cleans up decoder resources after each test input.

Changes

OTLP JSON fuzzing

Layer / File(s) Summary
Fuzzer registration and decoder dispatch
tests/internal/fuzzers/otlp_json_fuzzer.c, tests/internal/fuzzers/CMakeLists.txt
The new fuzz target selects a decoder from the first input byte, rejects short inputs, configures allocation failures, frees decoder outputs, and is added to generated test and OSS-Fuzz targets.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to c1a17

This change adds isolated OSS-Fuzz coverage for existing OTLP JSON decoders without altering production behavior or deployment paths. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: cosmo0920, edsiper

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title identifies the test scope and the addition of OSS-Fuzz targets for OTLP/JSON processing. It is related to the main change, but the wording is grammatically awkward.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DavidKorczynski DavidKorczynski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from my side! CC @edsiper

@cosmo0920

Copy link
Copy Markdown
Contributor


❌ Commit c1a17a4a23 failed:
Missing prefix in commit subject: 'OSS-Fuzz: Add new fuzzer targets otlp json process'


Commit prefix validation failed.

We need to follow the guideline of commit message.

@cosmo0920
cosmo0920 self-requested a review September 3, 2026 02:28
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants