aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-trace2syz/parser/parser.go
Commit message (Collapse)AuthorAgeFilesLines
* all: go fix everythingDmitry Vyukov2024-04-261-1/+0
|
* all: fix some function names in commentscui fliter2023-12-201-1/+1
| | | | Signed-off-by: cui fliter <imcusg@gmail.com>
* pkg: update generated files to go 1.17Alexey Kardashevskiy2021-07-071-0/+1
| | | | | | | | | | | "make generate" produces this diff when go 1.17 (go1.17-c95464f0ea3f==upstream) is used. Seems compatible with >=1.16. https://github.com/golang/go/commit/4d2d89ff42ca documents the syntax. https://github.com/golang/go/commit/eeadce2d8713 enforces "ignore" for unsatisfiable tags hence the pkg/csource/gen.go change. Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com>
* tools/syz-trace2syz: disable golangci-lintDmitry Vyukov2019-10-081-0/+2
| | | | | | A new version of golangci-lint started failing trying to build syz-trace2syz (because we already ignore some files). Ignore the rest of files to fix the failure.
* tools/syz-trace2syz: start adding proper error handlingDmitry Vyukov2018-12-071-5/+9
| | | | | | log.Fatal is not the proper way to handle errors. It does not allow to write good tests, fuzzers and utilities that crash all the time.
* tools/syz-trace2syz/proggen: add ParseFile functionDmitry Vyukov2018-12-071-10/+0
| | | | | | | | | | | | | | | | | | | | | | | 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.
* tools/syz-trace2syz/parser: remove Filename from TraceTreeDmitry Vyukov2018-12-071-5/+1
| | | | | | | | We already printed file name of the trace in parseTraces, no need to print it again and again. Consequently we don't need Filename in TraceTree. If needed, caller can always log it before parsing, or pass along with the TraceTree.
* tools/syz-trace2syz/parser: use []byte instead of string for file contentsDmitry Vyukov2018-12-071-9/+7
| | | | | If we are handling whole files, it's more efficient to use []byte. string is not really meant to hold large amounts of data.
* tools/syz-trace2syz: tidy up codeDmitry Vyukov2018-12-061-17/+9
| | | | | Lots of assorted changes mainly converting code to idiomatic Go and replacing code with equivalent, but shorter code.
* tools/syz-trace2syz: add tool to convert strace output to programsshankarapailoor2018-12-061-0/+73
* fixing weird merge error * fixing presubmit * fixing presubmit * removing parsing code because of -Xraw option * fix presubmit * update * deleting vma_call_handlers as we are currently skipping most vma calls. This simplifies memory_tracker as we don't need to keep track of vma allocations * removing custom handling of bpf_instruction union * removing ifconf parsing * update * removed all expression types and replaced them with constant types. removing ipv6_addr parsing while -Xraw is getting fixed. Removing constants.go * removing ipv6 parsing * presubmit * moving direction check from ipv4_addr out to genUnion * removing code that parses kcov * removing redundant test * removing custom code in generate unions to fill ipv4_addr * proggen: changing order of imports to make external packages import first fixing presubmit * changing log messages to lower case to be consistent with other packages. * removing pointer type and simplifying memory_tracker removing comment * moving context and return_cache to seaparate files * deleting default argument generation when we should probably throw an error