aboutsummaryrefslogtreecommitdiffstats
path: root/prog/encodingexec.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2015-12-28 12:58:10 +0100
committerDmitry Vyukov <dvyukov@google.com>2015-12-28 12:58:10 +0100
commit4eda9b07e5f25565333fdd8eed4e33850bd0f828 (patch)
tree45d2ec43dbc07109ea665432e68bab98f0b2a15c /prog/encodingexec.go
parent9f9ae3fcc3efc74cbcb805b44575b5c140fa97ee (diff)
prog: don't serialize paddings
Paddings in serialized programs are unnecessary and confusing. Instead restore them implicitly. Also use [,,,,] for arrays.
Diffstat (limited to 'prog/encodingexec.go')
-rw-r--r--prog/encodingexec.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/prog/encodingexec.go b/prog/encodingexec.go
index 3b0d4c28c..3b68f6c98 100644
--- a/prog/encodingexec.go
+++ b/prog/encodingexec.go
@@ -8,6 +8,8 @@ package prog
import (
"fmt"
+
+ "github.com/google/syzkaller/sys"
)
const (
@@ -57,7 +59,7 @@ func (p *Prog) SerializeForExec() []byte {
}
return
}
- if pad, _ := arg1.IsPad(); pad {
+ if sys.IsPad(arg1.Type) {
return
}
if arg1.Kind == ArgData && len(arg1.Data) == 0 {