Repository navigation
msgparse: preserve the value of XDR octal literals - #217
Open
pengpengyi92 wants to merge 1 commit into
Open
pengpengyi92 wants to merge 1 commit into
pengpengyi92 wants to merge 1 commit into
Conversation
Contributor
Author
|
Follow-up on verification: I reran the three Python regressions at eaa11ef locally today; all pass. The failing EC2 run stops at checkout, before the code or tests execute: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
XDR permits octal constants (RFC 4506 section 6.2). A fixed opaque field of width 010 currently translates to a .msg array of length 010, which msgparse reads as decimal 10 rather than XDR's 8. Convert octal tokens to decimal before emission, leaving zero, decimal and hexadecimal tokens unchanged. This proposal does not change the .msg grammar or address signed XDR values.
Verification: python -m unittest discover -s go/msgparse -p test_xdr2msg.py (two regressions fail on main; all three cases pass after the change). Regenerating the bundled NFS .msg produces the same output as both main and the checked-in file. No cluster or VM tests were run.