Skip to content

Commit 0932421

Browse files
authored
fix(libafl_frida): enable asan for Android x86_64 (#1578)
1 parent 6f67919 commit 0932421

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

libafl_frida/src/alloc.rs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#[cfg(any(
22
target_os = "linux",
33
target_vendor = "apple",
4-
all(target_arch = "aarch64", target_os = "android")
4+
all(
5+
any(target_arch = "aarch64", target_arch = "x86_64"),
6+
target_os = "android"
7+
)
58
))]
69
use std::{collections::BTreeMap, ffi::c_void};
710

@@ -12,7 +15,10 @@ use libafl_bolts::cli::FuzzerOptions;
1215
#[cfg(any(
1316
target_os = "linux",
1417
target_vendor = "apple",
15-
all(target_arch = "aarch64", target_os = "android")
18+
all(
19+
any(target_arch = "aarch64", target_arch = "x86_64"),
20+
target_os = "android"
21+
)
1622
))]
1723
use mmap_rs::{MemoryAreas, MmapFlags, MmapMut, MmapOptions, ReservedMut};
1824
use nix::libc::memset;
@@ -85,7 +91,10 @@ impl Allocator {
8591
windows,
8692
target_os = "linux",
8793
target_vendor = "apple",
88-
all(target_arch = "aarch64", target_os = "android")
94+
all(
95+
any(target_arch = "aarch64", target_arch = "x86_64"),
96+
target_os = "android"
97+
)
8998
)))]
9099
#[must_use]
91100
pub fn new(_: FuzzerOptions) -> Self {
@@ -97,7 +106,10 @@ impl Allocator {
97106
windows,
98107
target_os = "linux",
99108
target_vendor = "apple",
100-
all(target_arch = "aarch64", target_os = "android")
109+
all(
110+
any(target_arch = "aarch64", target_arch = "x86_64"),
111+
target_os = "android"
112+
)
101113
))]
102114
#[must_use]
103115
pub fn new(options: &FuzzerOptions) -> Self {
@@ -559,7 +571,10 @@ impl Default for Allocator {
559571
windows,
560572
target_os = "linux",
561573
target_vendor = "apple",
562-
all(target_arch = "aarch64", target_os = "android")
574+
all(
575+
any(target_arch = "aarch64", target_arch = "x86_64"),
576+
target_os = "android"
577+
)
563578
)))]
564579
fn default() -> Self {
565580
todo!("Shadow region not yet supported for this platform!");

0 commit comments

Comments
 (0)