Update fuzzbench_weighted to EXPLORE, fix linking (#707)
* Explore+weighted * fix * fmt Co-authored-by: Andrea Fioraldi <andreafioraldi@gmail.com>
This commit is contained in:
parent
a6e4cac56b
commit
0aba272a7d
@ -2,7 +2,7 @@ use libafl_cc::{ClangWrapper, CompilerWrapper, LLVMPasses};
|
|||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
let args: Vec<String> = env::args().collect();
|
let mut args: Vec<String> = env::args().collect();
|
||||||
if args.len() > 1 {
|
if args.len() > 1 {
|
||||||
let mut dir = env::current_exe().unwrap();
|
let mut dir = env::current_exe().unwrap();
|
||||||
let wrapper_name = dir.file_name().unwrap().to_str().unwrap();
|
let wrapper_name = dir.file_name().unwrap().to_str().unwrap();
|
||||||
@ -15,6 +15,9 @@ pub fn main() {
|
|||||||
|
|
||||||
dir.pop();
|
dir.pop();
|
||||||
|
|
||||||
|
// Must be always present, even without --libafl
|
||||||
|
args.push("-fsanitize-coverage=trace-pc-guard,trace-cmp".into());
|
||||||
|
|
||||||
let mut cc = ClangWrapper::new();
|
let mut cc = ClangWrapper::new();
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
@ -29,7 +32,6 @@ pub fn main() {
|
|||||||
.parse_args(&args)
|
.parse_args(&args)
|
||||||
.expect("Failed to parse the command line")
|
.expect("Failed to parse the command line")
|
||||||
.link_staticlib(&dir, "fuzzbench")
|
.link_staticlib(&dir, "fuzzbench")
|
||||||
.add_arg("-fsanitize-coverage=trace-pc-guard,trace-cmp")
|
|
||||||
.add_pass(LLVMPasses::CmpLogRtn)
|
.add_pass(LLVMPasses::CmpLogRtn)
|
||||||
.run()
|
.run()
|
||||||
.expect("Failed to run the wrapped compiler")
|
.expect("Failed to run the wrapped compiler")
|
||||||
|
@ -318,8 +318,9 @@ fn fuzz(
|
|||||||
let power = StdPowerMutationalStage::new(mutator, &edges_observer);
|
let power = StdPowerMutationalStage::new(mutator, &edges_observer);
|
||||||
|
|
||||||
// A minimization+queue policy to get testcasess from the corpus
|
// A minimization+queue policy to get testcasess from the corpus
|
||||||
let scheduler =
|
let scheduler = IndexesLenTimeMinimizerScheduler::new(StdWeightedScheduler::new(Some(
|
||||||
IndexesLenTimeMinimizerScheduler::new(StdWeightedScheduler::new(Some(PowerSchedule::FAST)));
|
PowerSchedule::EXPLORE,
|
||||||
|
)));
|
||||||
|
|
||||||
// A fuzzer with feedbacks and a corpus scheduler
|
// A fuzzer with feedbacks and a corpus scheduler
|
||||||
let mut fuzzer = StdFuzzer::new(scheduler, feedback, objective);
|
let mut fuzzer = StdFuzzer::new(scheduler, feedback, objective);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user