diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2022-01-05 13:47:09 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2022-01-11 16:30:08 +0100 |
| commit | 576c26a1524fc962de6cae781bf9ea5aebeaf7a3 (patch) | |
| tree | 0e437f285872d7623c4e1c0102eefe8e3e069410 | |
| parent | 2641e02529f7c14df9f43aa3a6fede4a4a9a537d (diff) | |
prog: fix call selection in rotation logic
We select calls from ctors[0] twice, but don't select calls from ctors[2] at all.
The second use of ctots[0] is supposed to be ctors[2].
Also use 'true' for always true conditions (we check them earlier).
| -rw-r--r-- | prog/rotation.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/prog/rotation.go b/prog/rotation.go index 544f22730..2eca62e55 100644 --- a/prog/rotation.go +++ b/prog/rotation.go @@ -174,11 +174,11 @@ func (rs *rotatorState) Select() map[*Syscall]bool { if nctors0 { continue } - rs.selectCalls(info.ctors[1], 2, !nctors0) + rs.selectCalls(info.ctors[1], 2, true) if nctors1 { continue } - rs.selectCalls(info.ctors[0], 2, !nctors1) + rs.selectCalls(info.ctors[2], 2, true) continue } if len(rs.topQueue) == 0 { @@ -212,7 +212,7 @@ func (rs *rotatorState) Select() map[*Syscall]bool { nctors1 := nctors0 || len(info.ctors[1]) != 0 rs.selectCalls(info.ctors[0], 5, true) rs.selectCalls(info.ctors[1], 3, !nctors0) - rs.selectCalls(info.ctors[0], 2, !nctors1) + rs.selectCalls(info.ctors[2], 2, !nctors1) rs.selectCalls(info.uses[0], 20, true) rs.selectCalls(info.uses[1], 2, len(info.uses[0]) == 0) } |
