From b55e33926118ca417bb0ce0c76ceec7c220f65bc Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 18 Apr 2024 09:09:32 +0200 Subject: pkg/ipc: make it possible to change EnvFlags between executions Pass EnvFlags into Exec instead of New. This allows to change EnvFlags between executions. Change of EnvFlags forces executor process restart since it uses EnvFlags during setup. Currently this is intended to be NFC since we always pass the same EnvFlags. In future this will allow to (1) reduce part of the VM checking procedure to execution of programs with different options (e.g. we can probe for coverage/comparisons support, probe different sandboxes, etc); (2) use it during fuzzing/reproduction, e.g. we can check if the crash reproduces under setuid sandbox, or execute some fuzzing programs in significantly different modes. --- executor/common_ext_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'executor/common_ext_test.go') diff --git a/executor/common_ext_test.go b/executor/common_ext_test.go index 672ad7c74..00bca4494 100644 --- a/executor/common_ext_test.go +++ b/executor/common_ext_test.go @@ -52,7 +52,7 @@ func TestCommonExt(t *testing.T) { t.Fatal(err) } cfg.Executor = bin - cfg.Flags |= ipc.FlagDebug + opts.EnvFlags |= ipc.FlagDebug env, err := ipc.MakeEnv(cfg, 0) if err != nil { t.Fatalf("failed to create env: %v", err) -- cgit mrf-deployment