syz-repro: fix false "not executing programs"

This commit is contained in:
Dmitry Vyukov 2016-09-03 12:35:16 +02:00
parent ecaaca55fc
commit 40280fa543
2 changed files with 5 additions and 2 deletions

View File

@ -83,7 +83,7 @@ func main() {
idx := pos
pos++
if idx%len(progs) == 0 && time.Since(lastPrint) > 5*time.Second {
log.Printf("executed %v programs\n", idx)
log.Printf("executed programs: %v", idx)
lastPrint = time.Now()
}
posMu.Unlock()

View File

@ -126,7 +126,10 @@ func MonitorExecution(outc <-chan []byte, errc <-chan error, local, needOutput b
}
case out := <-outc:
output = append(output, out...)
if bytes.Index(output[matchPos:], []byte("executing program")) != -1 {
if bytes.Index(output[matchPos:], []byte("executing program")) != -1 { // syz-fuzzer output
lastExecuteTime = time.Now()
}
if bytes.Index(output[matchPos:], []byte("executed programs:")) != -1 { // syz-execprog output
lastExecuteTime = time.Now()
}
if report.ContainsCrash(output[matchPos:]) {