From 8e75c913b6f9b09cab2ad31fd7d66ea0d1703de8 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 6 Mar 2024 16:09:41 +0100 Subject: prog: auto-set proper conditional fields in Deserialize() Treat all default union arguments as transient and reevaluate them after the call was fully parsed. Before conditional field patching, we do need to have performed arg validation, which also reevaluates conditions. To break the cycle, make validation configurable. --- prog/minimization.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prog/minimization.go') diff --git a/prog/minimization.go b/prog/minimization.go index a9864aca2..1760d180f 100644 --- a/prog/minimization.go +++ b/prog/minimization.go @@ -281,7 +281,7 @@ func minimizeInt(ctx *minimizeArgsCtx, arg Arg, path string) bool { // By mutating an integer, we risk violating conditional fields. // If the fields are patched, the minimization process must be restarted. - patched := ctx.call.setDefaultConditions(ctx.p.Target) + patched := ctx.call.setDefaultConditions(ctx.p.Target, false) if ctx.pred(ctx.p, ctx.callIndex0) { *ctx.p0 = ctx.p ctx.triedPaths[path] = true -- cgit mrf-deployment