From 33d1aba90b07c4319e1617be24f6f6dfd1b71d5e Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 19 Apr 2022 10:16:51 +0000 Subject: vm: support variable output buffer size Also update syz-crush to save RawOutput instead of output from the Report. --- pkg/instance/execprog.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'pkg/instance') 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 { -- cgit mrf-deployment