From efbdefc51d8d8ef8024a05119e176b38f3815051 Mon Sep 17 00:00:00 2001 From: Grigory Bazilevich Date: Sun, 15 Feb 2026 21:04:35 +0300 Subject: pkg/corpus: update Programs List priority storage Static prefix sums have been replaced with a Fenwick tree. In the current syzkaller, program priority was set based on a Signal received by a single system call. This commit allows priority to be changed dynamically, making it possible to maintain priority based on Signals from all system calls. Signed-off-by: Grigory Bazilevich --- pkg/corpus/prio_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/corpus/prio_test.go') diff --git a/pkg/corpus/prio_test.go b/pkg/corpus/prio_test.go index 71507c2b1..5f327896e 100644 --- a/pkg/corpus/prio_test.go +++ b/pkg/corpus/prio_test.go @@ -41,7 +41,7 @@ func TestChooseProgram(t *testing.T) { counters[corpus.chooseProgram(r)]++ } for p, prio := range priorities { - prob := float64(prio) / float64(corpus.sumPrios) + prob := float64(prio) / float64(corpus.prios.fullSum) diff := math.Abs(prob*maxIters - float64(counters[p])) if diff > eps*maxIters { t.Fatalf("the difference (%f) is higher than %f%%", diff, eps*100) -- cgit mrf-deployment