mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-28 05:40:26 +00:00
syz-fuzzer: write programs directly to stdout
On fuchsia log package misbehaves and programs are lost: https://fuchsia.atlassian.net/browse/TC-151 Write directly to stdout. Also should be slightly faster and shorter.
This commit is contained in:
parent
a6bf43aeeb
commit
7efe08c90a
@ -295,8 +295,11 @@ func (proc *Proc) logProgram(opts *ipc.ExecOpts, p *prog.Prog) {
|
||||
// It must not be intermixed.
|
||||
switch proc.fuzzer.outputType {
|
||||
case OutputStdout:
|
||||
now := time.Now()
|
||||
proc.fuzzer.logMu.Lock()
|
||||
log.Logf(0, "executing program %v%v:\n%s\n", proc.pid, strOpts, data)
|
||||
fmt.Printf("%02v:%02v:%02v executing program %v%v:\n%s\n",
|
||||
now.Hour(), now.Minute(), now.Second(),
|
||||
proc.pid, strOpts, data)
|
||||
proc.fuzzer.logMu.Unlock()
|
||||
case OutputDmesg:
|
||||
fd, err := syscall.Open("/dev/kmsg", syscall.O_WRONLY, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user