Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SoveraNia committed Jan 9, 2020
1 parent 5740593 commit e67caea
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion analyze/analyze_corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __processTest(test):
t_bgn = ts;
ts = ts - t_bgn
t_max = max(t_max, ts)
elif line[0] == '-' and 'executing program' in line:
elif line[0] == '-' and 'executeRaw' in line:
count += 1;
elif "addInputToCorpus" in line:
corpusCount += 1;
Expand Down
2 changes: 1 addition & 1 deletion analyze/analyze_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __processTestAltAlt(test):
line = line.strip('\n').strip();
if len(line) == 0:
continue;
if line[:2] == '- ' and "executing program" in line:
if line[:2] == '- ' and "executeRaw" in line:
tmp = line.split();
try:
n_calls = int(tmp[-1])
Expand Down
2 changes: 1 addition & 1 deletion analyze/analyze_mab.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __processTest(test):
line = line.strip('\n').strip();
if len(line) == 0:
continue;
if line[:2] == '- ' and "executing program" in line: # Prog/Syscall count
if line[:2] == '- ' and "executeRaw" in line: # Prog/Syscall count
tmp = line.split();
try:
n_calls = int(tmp[-1])
Expand Down
2 changes: 1 addition & 1 deletion analyze/analyze_programs.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __processTest(test):
ts_bgn = ts_cur
count["Time_Elapsed"] = (ts_cur - ts_bgn) / 1000000000.0 / 60.0
ret.append(copy.deepcopy(count))
elif line[:2] == '- ' and 'executing program' in line:
elif line[:2] == '- ' and 'executeRaw' in line:
# print(status)
pgsz = int(line.split()[-1])
if not p_current is None:
Expand Down
2 changes: 1 addition & 1 deletion analyze/analyze_triage.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __processTest(test):
coverageTotal.add(pc);
elif (pc & 0xffffffff00000000) == 0:
coverageTotal.add(pc);
elif line[:2] == "- " and "executing program" in line:
elif line[:2] == "- " and "executeRaw" in line:
executeCount += 1;
status = copy.deepcopy(status_cur);
status["executeCount"] = executeCount;
Expand Down
2 changes: 1 addition & 1 deletion analyze/analyze_work.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def __processTest(test):
exec_count = 0
syscall_count = 0
prev_ts = cur_status["Time_Elapsed"]
elif line[0] == '-' and 'executing program' in line:
elif line[0] == '-' and 'executeRaw' in line:
exec_count += 1;
try:
sz = int(line.split()[-1])
Expand Down
1 change: 1 addition & 0 deletions syz-fuzzer/proc.go
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,7 @@ func (proc *Proc) executeRaw(opts *ipc.ExecOpts, p *prog.Prog, stat Stat) (*ipc.

proc.logProgram(opts, p)
for try := 0; ; try++ {
proc.fuzzer.writeLog("- executeRaw %v\n", len(p.Calls))
atomic.AddUint64(&proc.fuzzer.stats[stat], 1)
output, info, hanged, err := proc.env.Exec(opts, p)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions syz-manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ func main() {
if err != nil {
log.Fatalf("%v", err)
}
fmt.Fprintf(os.Stdout, "<<<%v>>>\n", time.Now().UnixNano())
RunManager(cfg, target, sysTarget, syscalls)
}

Expand Down Expand Up @@ -218,6 +219,7 @@ func RunManager(cfg *mgrconfig.Config, target *prog.Target, sysTarget *targets.T
numReproducing := atomic.LoadUint32(&mgr.numReproducing)
numFuzzing := atomic.LoadUint32(&mgr.numFuzzing)

fmt.Fprintf(os.Stdout, "<<<%v>>>\n", time.Now().UnixNano())
log.Logf(0, "VMs %v, executed %v, cover %v, crashes %v, repro %v",
numFuzzing, executed, signal, crashes, numReproducing)
}
Expand Down

0 comments on commit e67caea

Please sign in to comment.