From a2559a604ca1c751bf41cec5f122fe3c5d2de333 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 15 Apr 2024 14:54:58 +0200 Subject: pkg/ipc: refactor rate limiting 1. Move the flag to Config (logically belongs there). 2. Create rate limter lazily (it's not needed most of the time). This will help to stop passing *prog.Prog to Exec method. --- pkg/ipc/ipcconfig/ipcconfig.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/ipc/ipcconfig') diff --git a/pkg/ipc/ipcconfig/ipcconfig.go b/pkg/ipc/ipcconfig/ipcconfig.go index 15e1dfde0..4b4aacd8a 100644 --- a/pkg/ipc/ipcconfig/ipcconfig.go +++ b/pkg/ipc/ipcconfig/ipcconfig.go @@ -41,6 +41,7 @@ func Default(target *prog.Target) (*ipc.Config, *ipc.ExecOpts, error) { c.Flags |= sandboxFlags c.UseShmem = sysTarget.ExecutorUsesShmem c.UseForkServer = sysTarget.ExecutorUsesForkServer + c.RateLimit = sysTarget.HostFuzzer && target.OS != targets.TestOS opts := &ipc.ExecOpts{ Flags: ipc.FlagDedupCover, } -- cgit mrf-deployment