diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-07-11 15:41:15 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-07-11 15:48:20 +0000 |
| commit | 6b32eea2d469bb3130898f200389ff1016b9046b (patch) | |
| tree | 397667c39fc1785f96e697cbf8da8506a3f5be12 /syz-manager | |
| parent | 9a444d3613c4d0cdd2d75c68408175488fed0a0b (diff) | |
syz-manager: optimize the numer of reserved VMs
If we're reproducing a bug with a crash title A and there are several
more crashes A in the reproduction queue, we still need to reserve VMs
for just one bug reproduction.
Diffstat (limited to 'syz-manager')
| -rw-r--r-- | syz-manager/repro.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/syz-manager/repro.go b/syz-manager/repro.go index 95859a163..178127084 100644 --- a/syz-manager/repro.go +++ b/syz-manager/repro.go @@ -205,12 +205,12 @@ func (m *reproManager) adjustPoolSizeLocked() { // Avoid the +-1 jitter by considering the repro queue size as well. // We process same-titled crashes sequentially, so only count unique ones. - uniqueTitles := make(map[string]bool) + uniqueTitles := maps.Clone(m.reproducing) for _, crash := range m.queue { uniqueTitles[crash.Title] = true } - needRepros := len(m.reproducing) + len(uniqueTitles) + needRepros := len(uniqueTitles) VMs := min(m.reproVMs, m.calculateReproVMs(needRepros)) m.mgr.resizeReproPool(VMs) } |
