diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-04-15 14:54:58 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-04-15 16:39:45 +0000 |
| commit | a2559a604ca1c751bf41cec5f122fe3c5d2de333 (patch) | |
| tree | 0c719a32f0e4be4eae8082d6236d4a77c5026699 /pkg/ipc/ipcconfig | |
| parent | 68d19d39aa87674e355a2c26333a0a4d4d370018 (diff) | |
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.
Diffstat (limited to 'pkg/ipc/ipcconfig')
| -rw-r--r-- | pkg/ipc/ipcconfig/ipcconfig.go | 1 |
1 files changed, 1 insertions, 0 deletions
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, } |
