mirror of
https://github.com/reactos/syzkaller.git
synced 2024-10-07 17:13:26 +00:00
prog: mutate programs more aggressively
Currently we stop mutating with 50% probability. Stop mutating with 33% probability instead. Benchmark shows both coverage increase and corpus reduction: baseline oneof3 diff coverage 65467 65604 137 corpus 35423 35354 -69 exec total 5474879 5023268 -451611
This commit is contained in:
parent
b218a25ecb
commit
c4901df5c3
@ -24,7 +24,7 @@ func (p *Prog) Mutate(rs rand.Source, ncalls int, ct *ChoiceTable, corpus []*Pro
|
||||
} else {
|
||||
// Mutate current prog without splicing.
|
||||
retry := false
|
||||
for stop := false; !stop || retry; stop = r.bin() {
|
||||
for stop := false; !stop || retry; stop = r.oneOf(3) {
|
||||
retry = false
|
||||
r.choose(
|
||||
20, func() {
|
||||
@ -54,7 +54,7 @@ func (p *Prog) Mutate(rs rand.Source, ncalls int, ct *ChoiceTable, corpus []*Pro
|
||||
return
|
||||
}
|
||||
s := analyze(ct, p, c)
|
||||
for stop := false; !stop; stop = r.bin() {
|
||||
for stop := false; !stop; stop = r.oneOf(3) {
|
||||
args, bases := mutationArgs(c)
|
||||
if len(args) == 0 {
|
||||
retry = true
|
||||
|
Loading…
Reference in New Issue
Block a user