about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2021-01-23 06:42:55 +0100
committerDominik Maier <domenukk@gmail.com>2021-01-23 06:42:55 +0100
commit4179affe2c7ee2e49f41619f1b8fe59bd4240354 (patch)
tree480944588c8b300caf37d51c2beac098159c2945
parent46cef4bc110f103ab9edc99f488ddecc968173df (diff)
downloadafl++-4179affe2c7ee2e49f41619f1b8fe59bd4240354.tar.gz
enabled persistent mode
-rw-r--r--unicorn_mode/samples/speedtest/rust/src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/unicorn_mode/samples/speedtest/rust/src/main.rs b/unicorn_mode/samples/speedtest/rust/src/main.rs
index 516c54d1..8e31d2e2 100644
--- a/unicorn_mode/samples/speedtest/rust/src/main.rs
+++ b/unicorn_mode/samples/speedtest/rust/src/main.rs
@@ -206,6 +206,11 @@ fn fuzz(input_file: &str) -> Result<(), uc_error> {
             true
         };
 
+    let crash_validation_callback =
+        |_uc: UnicornHandle<'_, _>, result, _input: &[u8], _persistent_round| {
+            result != uc_error::OK
+        };
+
     let end_addrs = parse_locs("main_ends").unwrap();
 
     let ret = uc.afl_fuzz(
@@ -214,7 +219,7 @@ fn fuzz(input_file: &str) -> Result<(), uc_error> {
         &end_addrs,
         Box::new(crash_validation_callback),
         false,
-        1,
+        1000,
     );
 
     match ret {