Revert "Increase default edgemap size" (#1803)

This commit is contained in:
Dongjia "toka" Zhang 2024-01-18 14:58:29 +01:00 committed by GitHub
parent 001e132186
commit df8fa71aa7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -311,7 +311,7 @@ pub const LIBAFL_CC_LLVM_VERSION: Option<usize> = None;
let mut cxxflags: Vec<String> = cxxflags.split_whitespace().map(String::from).collect(); let mut cxxflags: Vec<String> = cxxflags.split_whitespace().map(String::from).collect();
let edges_map_size: usize = option_env!("LIBAFL_EDGES_MAP_SIZE") let edges_map_size: usize = option_env!("LIBAFL_EDGES_MAP_SIZE")
.map_or(Ok(2621440), str::parse) .map_or(Ok(65536), str::parse)
.expect("Could not parse LIBAFL_EDGES_MAP_SIZE"); .expect("Could not parse LIBAFL_EDGES_MAP_SIZE");
cxxflags.push(format!("-DLIBAFL_EDGES_MAP_SIZE={edges_map_size}")); cxxflags.push(format!("-DLIBAFL_EDGES_MAP_SIZE={edges_map_size}"));

View File

@ -96,7 +96,7 @@ where
#[must_use] #[must_use]
pub fn new() -> Self { pub fn new() -> Self {
let map_size = option_env!("LIBAFL_EDGES_MAP_SIZE") let map_size = option_env!("LIBAFL_EDGES_MAP_SIZE")
.map_or(Ok(2621440), str::parse) .map_or(Ok(65536), str::parse)
.expect("Could not parse LIBAFL_EDGES_MAP_SIZE"); .expect("Could not parse LIBAFL_EDGES_MAP_SIZE");
Self { Self {
edges: (0..map_size).map(|_| None).collect(), edges: (0..map_size).map(|_| None).collect(),

View File

@ -13,7 +13,7 @@ fn main() {
let mut constants_file = File::create(dest_path).expect("Could not create file"); let mut constants_file = File::create(dest_path).expect("Could not create file");
let edges_map_size: usize = option_env!("LIBAFL_EDGES_MAP_SIZE") let edges_map_size: usize = option_env!("LIBAFL_EDGES_MAP_SIZE")
.map_or(Ok(2621440), str::parse) .map_or(Ok(65536), str::parse)
.expect("Could not parse LIBAFL_EDGES_MAP_SIZE"); .expect("Could not parse LIBAFL_EDGES_MAP_SIZE");
let cmp_map_size: usize = option_env!("LIBAFL_CMP_MAP_SIZE") let cmp_map_size: usize = option_env!("LIBAFL_CMP_MAP_SIZE")
.map_or(Ok(65536), str::parse) .map_or(Ok(65536), str::parse)