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 {
let mapping = mmap(
std::ptr::null_mut(),
0x1000,
None,
NonZeroUsize::try_from(0x1000).unwrap(),
ProtFlags::all(),
map_flags,
-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
/// block.
#[cfg(target_arch = "aarch64")]
#[allow(clippy::cast_possible_wrap)]
pub fn generate_inline_code(&mut self, h64: u64) -> Box<[u8]> {
let mut borrow = self.0.borrow_mut();
let prev_loc_ptr = addr_of_mut!(borrow.previous_pc);