diff --git a/libafl_targets/build.rs b/libafl_targets/build.rs index 68384f7686..5d7f66f1f6 100644 --- a/libafl_targets/build.rs +++ b/libafl_targets/build.rs @@ -68,9 +68,9 @@ pub const CMPLOG_MAP_H: usize = {}; } sancov_cmp - .define("CMP_MAP_SIZE", format!("{}", cmp_map_size)) - .define("CMPLOG_MAP_W", format!("{}", cmplog_map_w)) - .define("CMPLOG_MAP_H", format!("{}", cmplog_map_h)) + .define("CMP_MAP_SIZE", Some(&*format!("{}", cmp_map_size))) + .define("CMPLOG_MAP_W", Some(&*format!("{}", cmplog_map_w))) + .define("CMPLOG_MAP_H", Some(&*format!("{}", cmplog_map_h))) .file(_src_dir.join("sancov_cmp.c")) .compile("sancov_cmp"); } diff --git a/libafl_targets/src/sancov_pcguard.rs b/libafl_targets/src/sancov_pcguard.rs index 8ff3e6cecc..a616104871 100644 --- a/libafl_targets/src/sancov_pcguard.rs +++ b/libafl_targets/src/sancov_pcguard.rs @@ -1,6 +1,6 @@ //! [`LLVM` `PcGuard`](https://clang.llvm.org/docs/SanitizerCoverage.html#tracing-pcs-with-guards) runtime for `LibAFL`. -use crate::coverage::{EDGES_MAP, EDGES_MAP_SIZE, MAX_EDGES_NUM}; +use crate::coverage::{EDGES_MAP, MAX_EDGES_NUM}; #[cfg(all(feature = "sancov_pcguard_edges", feature = "sancov_pcguard_hitcounts"))] #[cfg(not(any(doc, feature = "clippy")))] @@ -42,7 +42,7 @@ pub unsafe extern "C" fn __sanitizer_cov_trace_pc_guard_init(mut start: *mut u32 while start < stop { MAX_EDGES_NUM = MAX_EDGES_NUM.wrapping_add(1); if MAX_EDGES_NUM >= EDGES_MAP.len() { - panic!(format!("The number of edges reported by SanitizerCoverage exceed the size of the edges map ({}). Use the LIBAFL_EDGES_MAP_SIZE env to increase it at compile time.", EDGES_MAP.len())); + panic!("The number of edges reported by SanitizerCoverage exceed the size of the edges map ({}). Use the LIBAFL_EDGES_MAP_SIZE env to increase it at compile time.", EDGES_MAP.len()); } *start = MAX_EDGES_NUM as u32; start = start.offset(1);