diff options
| author | Palash Oswal <oswalpalash@gmail.com> | 2023-02-20 15:29:45 -0800 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2023-02-21 07:06:10 +0100 |
| commit | f949448d9137ce181301419253c1bb224fcfea28 (patch) | |
| tree | f2da402b0b13b05ce4800d0035b7379cf0d3f9b7 /prog/prio.go | |
| parent | 2414209c29a67a42e91767f6ecafa825551e854c (diff) | |
prog: add comments about choicetable
Adds comments about how choice table runs values are populated
based on information from dynamic and static priorities.
Diffstat (limited to 'prog/prio.go')
| -rw-r--r-- | prog/prio.go | 3 |
1 files changed, 3 insertions, 0 deletions
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 |
