Frida: fix aarch64 build (#1153)

This commit is contained in:
Dominik Maier 2023-03-16 16:11:44 +01:00 committed by GitHub
parent 08fe6ab791
commit a351e7a509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -1677,8 +1677,8 @@ impl AsanRuntime {
unsafe { unsafe {
let mapping = mmap( let mapping = mmap(
std::ptr::null_mut(), None,
0x1000, NonZeroUsize::try_from(0x1000).unwrap(),
ProtFlags::all(), ProtFlags::all(),
map_flags, map_flags,
-1, -1,

View File

@ -77,6 +77,7 @@ impl CoverageRuntime {
/// every time we need a copy that is within a direct branch of the start of the transformed basic /// every time we need a copy that is within a direct branch of the start of the transformed basic
/// block. /// block.
#[cfg(target_arch = "aarch64")] #[cfg(target_arch = "aarch64")]
#[allow(clippy::cast_possible_wrap)]
pub fn generate_inline_code(&mut self, h64: u64) -> Box<[u8]> { pub fn generate_inline_code(&mut self, h64: u64) -> Box<[u8]> {
let mut borrow = self.0.borrow_mut(); let mut borrow = self.0.borrow_mut();
let prev_loc_ptr = addr_of_mut!(borrow.previous_pc); let prev_loc_ptr = addr_of_mut!(borrow.previous_pc);