aboutsummaryrefslogtreecommitdiffstats
path: root/prog/target.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-02-24 14:33:36 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-02-25 18:22:02 +0100
commit9fe8aa42c5bd11e2eb6952a16da6287205d7bf97 (patch)
tree7cf636dd611cb2a338cfeba13607b8e152545f19 /prog/target.go
parent2145057cb8a50aba1a27a67be19953bee9b164fd (diff)
prog: add arbitrary mutation of complex structs
Squash complex structs into flat byte array and mutate this array with generic blob mutations. This allows to mutate what we currently consider as paddings and add/remove paddings from structs, etc.
Diffstat (limited to 'prog/target.go')
-rw-r--r--prog/target.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/prog/target.go b/prog/target.go
index 99a6f9e50..870b924fc 100644
--- a/prog/target.go
+++ b/prog/target.go
@@ -52,6 +52,7 @@ type Target struct {
resourceMap map[string]*ResourceDesc
// Maps resource name to a list of calls that can create the resource.
resourceCtors map[string][]*Syscall
+ anyTypes
}
var targets = make(map[string]*Target)
@@ -148,6 +149,7 @@ func (target *Target) initTarget() {
for _, res := range target.Resources {
target.resourceCtors[res.Name] = target.calcResourceCtors(res.Kind, false)
}
+ initAnyTypes(target)
}
type Gen struct {