diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-12-09 17:08:14 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-12-10 16:37:01 +0100 |
| commit | 95fe19c19e596446412626b048d950de6ce8c886 (patch) | |
| tree | 4dc35d5dc26acf7a3fa78eafdda07bbd283b2bcc /prog/parse.go | |
| parent | a5efea3ec3e302da3fa01ca44604fe62aec49a79 (diff) | |
prog: introduce strict parsing mode
Over time we relaxed parsing to handle all kinds of invalid programs
(excessive/missing args, wrong types, etc).
This is useful when reading old programs from corpus.
But this is harmful for e.g. reading test inputs as they can become arbitrary outdated.
For runtests which creates additional problem of executing not
what is actually written in the test (or at least what author meant).
Add strict parsing mode that does not tolerate any errors.
For now it just checks excessive syscall arguments.
Diffstat (limited to 'prog/parse.go')
| -rw-r--r-- | prog/parse.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/prog/parse.go b/prog/parse.go index c62601702..8a8fdf9b1 100644 --- a/prog/parse.go +++ b/prog/parse.go @@ -55,7 +55,7 @@ func (target *Target) ParseLog(data []byte) []*LogEntry { continue } tmp := append(cur, line...) - p, err := target.Deserialize(tmp) + p, err := target.Deserialize(tmp, NonStrict) if err != nil { continue } |
