diff --git a/fuzzers/frida_libpng/Cargo.toml b/fuzzers/frida_libpng/Cargo.toml index 4fe870bfdc..ae06dd2ea4 100644 --- a/fuzzers/frida_libpng/Cargo.toml +++ b/fuzzers/frida_libpng/Cargo.toml @@ -19,6 +19,7 @@ debug = true [build-dependencies] cc = { version = "1.0", features = ["parallel"] } num_cpus = "1.0" +which = "4.1" [target.'cfg(unix)'.dependencies] libafl = { path = "../../libafl/" } diff --git a/fuzzers/frida_libpng/README.md b/fuzzers/frida_libpng/README.md index f56138c2b5..dd032eb121 100644 --- a/fuzzers/frida_libpng/README.md +++ b/fuzzers/frida_libpng/README.md @@ -7,7 +7,7 @@ It has been tested on Linux. ## Build To build this example, run `cargo build --example libfuzzer_libpng --release`. -This will call (the build.rs)[./builld.rs], which in turn downloads a libpng archive from the web. +This will call (the build.rs)[./build.rs], which in turn downloads a libpng archive from the web. Then, it will link (the fuzzer)[./src/fuzzer.rs] against (the C++ harness)[./harness.cc] and the instrumented `libpng`. Afterwards, the fuzzer will be ready to run, from `../../target/examples/libfuzzer_libpng`. diff --git a/fuzzers/frida_libpng/build.rs b/fuzzers/frida_libpng/build.rs index 211ff7c400..d6d7e094bf 100644 --- a/fuzzers/frida_libpng/build.rs +++ b/fuzzers/frida_libpng/build.rs @@ -15,7 +15,7 @@ fn build_dep_check(tools: &[&str]) { for tool in tools.into_iter() { println!("Checking for build tool {}...", tool); - match which::which(tool) { + match which(tool) { Ok(path) => println!("Found build tool {}", path.to_str().unwrap()), Err(_) => { println!("ERROR: missing build tool {}", tool); @@ -25,7 +25,6 @@ fn build_dep_check(tools: &[&str]) { } } - fn main() { if cfg!(windows) { println!("cargo:warning=Skipping libpng frida example on Windows"); @@ -134,5 +133,4 @@ fn main() { .status() .unwrap(); assert!(status.success()); - } diff --git a/fuzzers/libfuzzer_libpng/Cargo.toml b/fuzzers/libfuzzer_libpng/Cargo.toml index 3bb4df74f4..589fc6bb6b 100644 --- a/fuzzers/libfuzzer_libpng/Cargo.toml +++ b/fuzzers/libfuzzer_libpng/Cargo.toml @@ -8,7 +8,6 @@ edition = "2018" default = ["std"] std = [] -<<<<<<< HEAD #[profile.release] #lto = true #codegen-units = 1 @@ -19,13 +18,6 @@ std = [] cc = { version = "1.0", features = ["parallel"] } which = { version = "4.0.2" } num_cpus = "1.0" -======= -[profile.release] -lto = true -codegen-units = 1 -opt-level = 3 -debug = true ->>>>>>> dev [dependencies] libafl = { path = "../../libafl/" } diff --git a/fuzzers/libfuzzer_libpng/README.md b/fuzzers/libfuzzer_libpng/README.md index 17035c6ddc..9d33d2f724 100644 --- a/fuzzers/libfuzzer_libpng/README.md +++ b/fuzzers/libfuzzer_libpng/README.md @@ -6,13 +6,6 @@ It has been tested on Linux. ## Build -<<<<<<< HEAD -You will need `clang` and `clang++` along with basic build dependencies for this example to compile. -To build this example, run `cargo build --example libfuzzer_libpng --release`. -This will call [the build.rs](./build.rs), which in turn downloads a libpng archive from the web. -Then, it will link [the fuzzer](./src/fuzzer.rs) against [the C++ harness](./harness.cc) and the instrumented `libpng`. -Afterwards, the fuzzer will be ready to run, from `../../target/examples/libfuzzer_libpng`. -======= To build this example, run `cargo build --release`. This will build the library with the fuzzer (src/lib.rs) with the libfuzzer compatibility layer and the SanitizerCoverage runtime functions for coverage feedback. In addition, it will build also two C and C++ compiler wrappers (bin/c(c/xx).rs) that you must use to compile the target. @@ -36,7 +29,6 @@ Now, we have to build the libfuzzer harness and link all togheter to create our ``` Afterwards, the fuzzer will be ready to run simply executing `./fuzzer`. ->>>>>>> dev ## Run