diff --git a/libafl_cc/src/lib.rs b/libafl_cc/src/lib.rs index 499e85aa1c..1793b8ff42 100644 --- a/libafl_cc/src/lib.rs +++ b/libafl_cc/src/lib.rs @@ -104,6 +104,16 @@ impl Configuration { pub fn to_flags(&self) -> Result, Error> { Ok(match self { Configuration::Default => vec![], + // hardware asan is more memory efficient than asan on arm64 + #[cfg(all( + any(target_os = "linux", target_os = "android"), + target_arch = "aarch64" + ))] + Configuration::AddressSanitizer => vec!["-fsanitize=hwaddress".to_string()], + #[cfg(not(all( + any(target_os = "linux", target_os = "android"), + target_arch = "aarch64" + )))] Configuration::AddressSanitizer => vec!["-fsanitize=address".to_string()], Configuration::UndefinedBehaviorSanitizer => vec!["-fsanitize=undefined".to_string()], Configuration::GenerateCoverageMap => {