From f949448d9137ce181301419253c1bb224fcfea28 Mon Sep 17 00:00:00 2001 From: Palash Oswal Date: Mon, 20 Feb 2023 15:29:45 -0800 Subject: prog: add comments about choicetable Adds comments about how choice table runs values are populated based on information from dynamic and static priorities. --- prog/prio.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'prog/prio.go') diff --git a/prog/prio.go b/prog/prio.go index 535999c1a..681708893 100644 --- a/prog/prio.go +++ b/prog/prio.go @@ -224,6 +224,9 @@ func (target *Target) BuildChoiceTable(corpus []*Prog, enabled map[*Syscall]bool } prios := target.CalculatePriorities(corpus) run := make([][]int32, len(target.Syscalls)) + // ChoiceTable.runs[][] contains cumulated sum of weighted priority numbers. + // This helps in quick binary search with biases when generating programs. + // This only applies for system calls that are enabled for the target. for i := range run { if !enabled[target.Syscalls[i]] { continue -- cgit mrf-deployment