diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-07-01 10:39:44 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-07-01 11:33:16 +0000 |
| commit | a073c096d4d2337ecef7371ff309953bc8455104 (patch) | |
| tree | 81bcd5840972816d8f0161ab9b6a38b669dec20e /pkg/instance | |
| parent | 6e83b42dcfcd13c3b8e0d5c803cdcc424c0fbff9 (diff) | |
pkg/instance: patch empty Sandbox for all syz-execprog calls
Since #6123, the ability to run syz reproducers with Sandbox="" is also
relevant for pkg/repro.
Instead of patching the value at Env.Test(), do it right before
the syz-execprog's invocation.
Closes #6137.
Diffstat (limited to 'pkg/instance')
| -rw-r--r-- | pkg/instance/instance.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pkg/instance/instance.go b/pkg/instance/instance.go index 95c0463b5..bcb56e8e4 100644 --- a/pkg/instance/instance.go +++ b/pkg/instance/instance.go @@ -454,12 +454,7 @@ func (inst *inst) csourceOptions() (csource.Options, error) { return opts, err } // Combine repro options and default options in a way that increases chances to reproduce the crash. - // First, we always enable threaded/collide as it should be [almost] strictly better. - // Executor does not support empty sandbox, so we use none instead. - // Finally, always use repeat and multiple procs. - if opts.Sandbox == "" { - opts.Sandbox = "none" - } + // We always enable threaded/collide as it should be [almost] strictly better. opts.Repeat, opts.Threaded = true, true return opts, nil } @@ -471,6 +466,11 @@ func ExecprogCmd(execprog, executor, OS, arch, vmType string, opts csource.Optio if opts.Repeat { repeatCount = 0 } + sandbox := opts.Sandbox + if sandbox == "" { + // Executor does not support empty sandbox, so we use none instead. + sandbox = "none" + } osArg := "" if targets.Get(OS, arch).HostFuzzer { osArg = " -os=" + OS @@ -489,7 +489,7 @@ func ExecprogCmd(execprog, executor, OS, arch, vmType string, opts csource.Optio } return fmt.Sprintf("%v -executor=%v -arch=%v%v -sandbox=%v"+ " -procs=%v -repeat=%v -threaded=%v -collide=%v -cover=0%v %v", - execprog, executor, arch, osArg, opts.Sandbox, + execprog, executor, arch, osArg, sandbox, opts.Procs, repeatCount, opts.Threaded, opts.Collide, optionalArg, progFile) } |
