From 21d737fbf9bad3f2a9190bc31212f29edbfcaeb3 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 28 Sep 2022 13:17:51 +0000 Subject: sys: control structural changes during neutralization Ideally, we should properly support the already existing fix flag to distinguish between fixing and checking, but for now at least let it control whether structural changes are to be made. Otherwise we get into trouble while hint-mutating syz_mount_image calls, because we iterate over all call arguments and (possibly) remove them at the same time. It leads to `bad group arg size %v, should be <= %v for %#v type %#v` errors. --- sys/akaros/init.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/akaros') diff --git a/sys/akaros/init.go b/sys/akaros/init.go index fa987eb7a..7f8f1dc16 100644 --- a/sys/akaros/init.go +++ b/sys/akaros/init.go @@ -20,7 +20,7 @@ func InitTarget(target *prog.Target) { target.Neutralize = arch.Neutralize } -func (arch *arch) Neutralize(c *prog.Call) { +func (arch *arch) Neutralize(c *prog.Call, fixStructure bool) error { switch c.Meta.CallName { case "mmap": c.Args[3].(*prog.ConstArg).Val |= arch.MAP_FIXED @@ -30,4 +30,5 @@ func (arch *arch) Neutralize(c *prog.Call) { pid.Val = 0 } } + return nil } -- cgit mrf-deployment