Skip to content

Commit

Permalink
fix: return the correct exit code following a libfuzzer failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekleog-NEAR committed Sep 11, 2023
1 parent 01b21f5 commit 0ad525e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/bolero-libfuzzer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,9 @@ pub mod fuzzer {
.chain(Some(core::ptr::null())) // add a null pointer to the end
.collect::<Vec<_>>();

unsafe {
LLVMFuzzerStartTest(args.len() as c_int, c_args.as_ptr());
}
let res = unsafe { LLVMFuzzerStartTest(args.len() as c_int, c_args.as_ptr()) };

std::process::exit(0);
std::process::exit(res);
}

#[doc(hidden)]
Expand Down

0 comments on commit 0ad525e

Please sign in to comment.