Jens-G opened a new pull request, #3549: URL: https://github.com/apache/thrift/pull/3549
## Summary - Adds `CheckRecursionDepth(ctx)` / `DecrementRecursionDepth(ctx)` helpers in `lib/go/thrift/recursion_tracker.go` that track per-context struct nesting depth - Default limit is `DEFAULT_RECURSION_DEPTH` (64), matching the existing skip-depth constant - Go generator emits `CheckRecursionDepth` / `defer DecrementRecursionDepth` at the start of every generated `Read` and `Write` method - Returns `DEPTH_LIMIT` `TProtocolException` when the limit is exceeded ## Test plan - [ ] `TestCheckRecursionDepthShallow` — allows 64 levels without error - [ ] `TestCheckRecursionDepthExceeded` — returns `DEPTH_LIMIT` on level 65 - [ ] `TestDecrementRecursionDepth` — restores depth so further nesting is possible - [ ] Full `go test ./...` in `lib/go/thrift` passes 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Sonnet 4.6 <[email protected]> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
