Skip to content

Commit

Permalink
remove panic handling at runtime and add proc_macro2 to example
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulGrandperrin committed Apr 28, 2018
1 parent 8ecbdea commit c70854e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ authors = ["Paul Grandperrin <paul.grandperrin@gmail.com>"]

[dependencies]
honggfuzz = {path = ".."}
# arbitrary = "0.1"
# arbitrary = "0.1"
proc-macro2 = { git = "https://github.com/alexcrichton/proc-macro2.git" }

1 change: 1 addition & 0 deletions example/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#[macro_use] extern crate honggfuzz;
extern crate proc_macro2;

fn main() {
// Here you can parse `std::env::args and
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ pub fn fuzz<F>(closure: F) where F: Fn(&[u8]) {
lazy_static! {
static ref PANIC_HOOK: () = {
std::panic::set_hook(Box::new(|_| {
std::process::abort();
//std::process::abort();
}))
};
}
Expand Down Expand Up @@ -273,7 +273,7 @@ pub fn fuzz<F>(closure: F) where F: Fn(&[u8]) + std::panic::RefUnwindSafe {
if did_panic {
// hopefully the custom panic hook will be called before and abort the
// process before the stack frames are unwinded.
std::process::abort();
//std::process::abort();
}
}

Expand Down

0 comments on commit c70854e

Please sign in to comment.