diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-11-07 16:01:00 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-11-07 16:50:40 +0000 |
| commit | 6410b21bc162fd5f9527bda7484828c53cd872d0 (patch) | |
| tree | b628ceee8e459fa8e62ab492ba38e577b5d777ac /tools/syz-diff | |
| parent | 069a4a6eb9923b8553bcbc4dd2d75a528da14453 (diff) | |
pkg/manager: set more http fields before calling Serve
Pools and ReproLoop and always created on start,
so there is no need to support lazy set for them.
It only complicates code and makes it harder to reason about.
Also introduce vm.Dispatcher as an alias to dispatcher.Pool,
as it's the only specialization we use in the project.
Diffstat (limited to 'tools/syz-diff')
| -rw-r--r-- | tools/syz-diff/diff.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/syz-diff/diff.go b/tools/syz-diff/diff.go index 6a6a0991d..c3da6c8ec 100644 --- a/tools/syz-diff/diff.go +++ b/tools/syz-diff/diff.go @@ -93,8 +93,10 @@ func main() { DiffStore: store, }, } - diffCtx.http.Pools.Store(new.name, new.pool) - diffCtx.http.Pools.Store(base.name, base.pool) + diffCtx.http.Pools = map[string]*vm.Dispatcher{ + new.name: new.pool, + base.name: base.pool, + } new.http = diffCtx.http diffCtx.Loop(ctx) @@ -114,7 +116,7 @@ type diffContext struct { func (dc *diffContext) Loop(ctx context.Context) { reproLoop := manager.NewReproLoop(dc, dc.new.pool.Total()-dc.new.cfg.FuzzingVMs, false) - dc.http.ReproLoop.Store(reproLoop) + dc.http.ReproLoop = reproLoop go func() { // Let both base and patched instances somewhat progress in fuzzing before we take // VMs away for bug reproduction. @@ -235,7 +237,7 @@ type kernelContext struct { serv rpcserver.Server servStats rpcserver.Stats crashes chan *report.Report - pool *dispatcher.Pool[*vm.Instance] + pool *vm.Dispatcher features flatrpc.Feature candidates chan []fuzzer.Candidate |
