Skip to content

fix: Switch Triton JSON parsing to iterative mode for deep nesting#156

Merged
whoisj merged 3 commits into
mainfrom
spolisetty/tri-868-psirt-triton-nested-json-parsing-causes-denial-of-service
Apr 21, 2026
Merged

fix: Switch Triton JSON parsing to iterative mode for deep nesting#156
whoisj merged 3 commits into
mainfrom
spolisetty/tri-868-psirt-triton-nested-json-parsing-causes-denial-of-service

Conversation

@pskiran1
Copy link
Copy Markdown
Member

@pskiran1 pskiran1 commented Apr 16, 2026

This PR updates Triton’s JSON wrapper to parse in RapidJSON iterative mode to avoid call-stack exhaustion when handling deeply nested JSON inputs.

CI: triton-inference-server/server#8745

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates Triton’s JSON wrapper to parse in RapidJSON iterative mode to avoid call-stack exhaustion when handling deeply nested JSON inputs.

Changes:

  • Switch TritonJson::Value::Parse() to use rapidjson::kParseIterativeFlag in addition to kParseNanAndInfFlag.
  • Add inline comment documenting the motivation (deep nesting / stack usage).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread include/triton/common/triton_json.h
@whoisj whoisj merged commit 3898bba into main Apr 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants