Jens-G opened a new pull request, #3548: URL: https://github.com/apache/thrift/pull/3548
## Summary - Introduces a thread-local `DepthGuard` RAII type in `thrift::protocol` that increments a per-thread counter on construction and decrements it via `Drop` - Generated `read_from_in_protocol` and `write_to_out_protocol` implementations (for both structs and unions) acquire a `DepthGuard` at entry - A depth ≥ 64 returns an immediate `ProtocolError` with `kind = DepthLimit` - Three unit tests cover: allow up to limit, reject at limit, restore depth on drop ## Test plan - [ ] `cargo test` in `lib/rs` passes - [ ] Unit tests `depth_guard_allows_up_to_limit`, `depth_guard_rejects_at_limit`, `depth_guard_restores_depth_on_drop` pass - [ ] Cross-language tests unaffected 🤖 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]
