Skip to content

Commit 5b0e3dd

Browse files
authored
Make fuzzbench debugging easier (#1574)
* to make debugging easier * debug
1 parent d3a4b72 commit 5b0e3dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fuzzers/fuzzbench/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,9 @@ fn fuzz(
386386
{
387387
let null_fd = file_null.as_raw_fd();
388388
dup2(null_fd, io::stdout().as_raw_fd())?;
389-
dup2(null_fd, io::stderr().as_raw_fd())?;
389+
if !std::env::var("LIBAFL_FUZZBENCH_DEBUG").is_ok() {
390+
dup2(null_fd, io::stderr().as_raw_fd())?;
391+
}
390392
}
391393
// reopen file to make sure we're at the end
392394
log.replace(OpenOptions::new().append(true).create(true).open(logfile)?);

0 commit comments

Comments
 (0)