Make fuzzbench debugging easier (#1574)

* to make debugging easier

* debug
This commit is contained in:
Dongjia "toka" Zhang 2023-09-29 18:32:09 +02:00 committed by GitHub
parent d3a4b726d8
commit 5b0e3dd3bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -386,7 +386,9 @@ fn fuzz(
{ {
let null_fd = file_null.as_raw_fd(); let null_fd = file_null.as_raw_fd();
dup2(null_fd, io::stdout().as_raw_fd())?; dup2(null_fd, io::stdout().as_raw_fd())?;
dup2(null_fd, io::stderr().as_raw_fd())?; if !std::env::var("LIBAFL_FUZZBENCH_DEBUG").is_ok() {
dup2(null_fd, io::stderr().as_raw_fd())?;
}
} }
// reopen file to make sure we're at the end // reopen file to make sure we're at the end
log.replace(OpenOptions::new().append(true).create(true).open(logfile)?); log.replace(OpenOptions::new().append(true).create(true).open(logfile)?);