From 71f106be20b7d2c9638ffbb8fff8904a394d3c16 Mon Sep 17 00:00:00 2001 From: WorksButNotTested <62701594+WorksButNotTested@users.noreply.github.com> Date: Wed, 1 Feb 2023 08:46:12 +0000 Subject: [PATCH] Fix accidental breakage of non-AARCH64 systems (#1036) Co-authored-by: Your Name --- libafl_frida/src/coverage_rt.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libafl_frida/src/coverage_rt.rs b/libafl_frida/src/coverage_rt.rs index 8d6ff45fe8..55c257b63f 100644 --- a/libafl_frida/src/coverage_rt.rs +++ b/libafl_frida/src/coverage_rt.rs @@ -202,8 +202,11 @@ impl CoverageRuntime { // these spilt registers. This, however, means we need to retard the // code writer so that we can overwrite the so-called "restoration // prologue". - let pc = writer.pc(); - writer.reset(pc - 4); + #[cfg(target_arch = "aarch64")] + { + let pc = writer.pc(); + writer.reset(pc - 4); + } let code = self.generate_inline_code(h64 & (MAP_SIZE as u64 - 1)); writer.put_bytes(&code);