From 9fe8aa42c5bd11e2eb6952a16da6287205d7bf97 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 24 Feb 2018 14:33:36 +0100 Subject: 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. --- prog/resources.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'prog/resources.go') diff --git a/prog/resources.go b/prog/resources.go index f7d124848..6ae33c83f 100644 --- a/prog/resources.go +++ b/prog/resources.go @@ -33,6 +33,9 @@ func (target *Target) calcResourceCtors(kind []string, precise bool) []*Syscall // isCompatibleResource returns true if resource of kind src can be passed as an argument of kind dst. func (target *Target) isCompatibleResource(dst, src string) bool { + if dst == target.anyRes32.TypeName || dst == target.anyRes64.TypeName { + return true + } dstRes := target.resourceMap[dst] if dstRes == nil { panic(fmt.Sprintf("unknown resource '%v'", dst)) -- cgit mrf-deployment