-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/syz-trace2syz/proggen: add ParseFile function
Current code structuring has 2 problems: 1. parsing anything with proggen requires complex multistep dance including - parsing data with parser - walking the resulting tree manually and calling proggen on each - then for each context - calling FillOutMemory (unclear why it's not part of parsing) - calling prog.Finalize - checking is the program is not too large All of this duplicated across trace2syz and tests. And any new tests or fuzzers we will write will need to duplicate all of this logic too. 2. As the result of this structuring, lots of proggen guts and implementation details are exposed. While none of the callers are actually intersted in Context details, they are not interested in Context itself whatsoever. What every caller wants is "here is data to parse, give me programs". Add such function.
- Loading branch information
Showing
6 changed files
with
79 additions
and
98 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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