Skip to content

test[llm-llamacpp]: bounded FuzzTest for stop-string and log sanitizers - #4596

Open
jpgaribotti wants to merge 1 commit into
tetherto:mainfrom
jpgaribotti:feat/llm-llamacpp-string-fuzz
Open

jpgaribotti wants to merge 1 commit into
tetherto:mainfrom
jpgaribotti:feat/llm-llamacpp-string-fuzz

Conversation

@jpgaribotti

Copy link
Copy Markdown
Contributor

🎯 What problem does this PR solve?

  • forLogMessage, toLowerAscii, and matchesAnyStopString take attacker-controlled prompt / template / antiprompt text. Empty stop entries, huge fragments, and control bytes are the same untrusted-input class as the NMT header parsers.
  • They are header-only and already unit-tested, but had no property coverage under ASan + LSan.

📝 How does it solve it?

  • Add llm-string-fuzz over those three helpers with no LINK_FABRIC (full ASan + LeakSanitizer).
  • Seed empty stops, truncated log fragments, and case-folded template tags so bounded CI actually reaches the interesting paths.
  • Wire fuzz* scripts, the vcpkg fuzz feature, and Linux npm run fuzz after the coverage harvest in cpp-tests-llm.yml.
  • Patch bump @qvac/llm-llamacpp 0.53.20.53.3. No public addon API changes.

🧪 How was it tested?

  • Follows the classification-ggml Phase 0 template (docs/architecture/ADDON-FUZZING.md).
  • Bounded mode is what Linux C++ CI will run.
  • on-pr-llm-llamacpp.yml is pull_request_target and reads workflow YAML from main, so the new fuzz steps run after this lands, not on this PR itself.

@github-actions

Copy link
Copy Markdown
Contributor

Review Status

Current Status: ❌ PENDING
Approvals so far: none

Pending reviews: Needs 1 Management or Team Lead, and 1 more from Management, Team Lead, or Member.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant