aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/instance/execprog.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2022-04-19 10:16:51 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2022-04-29 17:16:33 +0200
commit33d1aba90b07c4319e1617be24f6f6dfd1b71d5e (patch)
tree3c0269519b2f2dfc50476d065a43a82d0137c3f8 /pkg/instance/execprog.go
parenta04ae3093de7eebc147770fe38a5bda96b5c0634 (diff)
vm: support variable output buffer size
Also update syz-crush to save RawOutput instead of output from the Report.
Diffstat (limited to 'pkg/instance/execprog.go')
-rw-r--r--pkg/instance/execprog.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/instance/execprog.go b/pkg/instance/execprog.go
index 7610298a6..1d775c22c 100644
--- a/pkg/instance/execprog.go
+++ b/pkg/instance/execprog.go
@@ -22,6 +22,7 @@ type OptionalConfig struct {
ExitCondition vm.ExitCondition
Logf ExecutorLogger
OldFlagsCompatMode bool
+ BeforeContextLen int
}
type ExecProgInstance struct {
@@ -34,7 +35,7 @@ type ExecProgInstance struct {
}
type RunResult struct {
- Report *report.Report
+ vm.ExecutionResult
}
func SetupExecProg(vmInst *vm.Instance, mgrCfg *mgrconfig.Config, reporter *report.Reporter,
@@ -90,8 +91,10 @@ func (inst *ExecProgInstance) runCommand(command string, duration time.Duration)
if err != nil {
return nil, fmt.Errorf("failed to run command in VM: %v", err)
}
- result := &RunResult{}
- result.Report = inst.VMInstance.MonitorExecution(outc, errc, inst.reporter, inst.ExitCondition)
+ result := &RunResult{
+ ExecutionResult: *inst.VMInstance.MonitorExecutionRaw(outc, errc,
+ inst.reporter, inst.ExitCondition, inst.BeforeContextLen),
+ }
if result.Report == nil {
inst.Logf(2, "program did not crash")
} else {