-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
protoc-gen-swagger: Fix message recursion detection #1437
Conversation
- Fixes a bug introduced during 9e25b2b which introduced recursion detection within messages. Briefly, the nature of the bug was that references to messages not in the current recursion traversal were remaining in the map used to track those occurrences. - Includes a test case outlining the edge case that prompted this fix.
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
@googlebot I fixed it. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant! This looks great, sorry for the inconvenience.
Fuzzit is being flukey, I'll override it |
Thanks for your contribution! Could you please cherry pick this against v2? |
Thanks @johanbrandhorst for the merge! |
detection within messages. Briefly, the nature of the bug was that
references to messages not in the current recursion traversal were
remaining in the map used to track those occurrences.
References to other Issues or PRs
Have you read the Contributing Guidelines?
Brief description of what is fixed or changed
Briefly, the nature of the bug was that references to messages not in the current recursion traversal path were remaining in the map used to track those occurrences. The fix just ensures those references don't hang around while recursing and are passed by value only.
Other comments
Testing the new case before fix...
And after the fix...