prog: add support for decimal arguments in text format#6899
Merged
ramosian-glider merged 1 commit intogoogle:masterfrom Mar 10, 2026
Merged
prog: add support for decimal arguments in text format#6899ramosian-glider merged 1 commit intogoogle:masterfrom
ramosian-glider merged 1 commit intogoogle:masterfrom
Conversation
dd756ac to
e4cab08
Compare
a-nogikh
previously approved these changes
Mar 10, 2026
Collaborator
a-nogikh
left a comment
There was a problem hiding this comment.
Let's maybe update https://github.com/google/syzkaller/blob/master/docs/program_syntax.md as well?
dvyukov
reviewed
Mar 10, 2026
e4cab08 to
3b53ed8
Compare
Previously, the parser only expected the '0' character to begin an integer
argument, which effectively meant it only handled hexadecimal formatting
(e.g., `0x...`) when parsing arguments.
This change modifies parseArgImpl() to route any starting digit ('0'-'9')
to the integer parsing logic. Since `strconv.ParseUint` already handles
base-10 parsing using the "0" base flag, this cleanly enables the parser
to natively deserialize decimal and octal arguments.
3b53ed8 to
8dd4ce5
Compare
Member
Author
Done |
dvyukov
approved these changes
Mar 10, 2026
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.
Previously, the parser only expected the '0' character to begin an integer argument, which effectively meant it only handled hexadecimal formatting (e.g.,
0x...) when parsing arguments.This change modifies parseArgImpl() to route any starting digit ('0'-'9') to the integer parsing logic. Since
strconv.ParseUintalready handles base-10 parsing using the "0" base flag, this cleanly enables the parser to natively deserialize decimal arguments.Before sending a pull request, please review Contribution Guidelines:
https://github.com/google/syzkaller/blob/master/docs/contributing.md