Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frida-gum: Cannot find function g_object_unref in crate gum_sys on aarch64-linux-android #124

Open
SajjadPourali opened this issue Jan 8, 2024 · 1 comment

Comments

@SajjadPourali
Copy link
Contributor

g_object_unref is not available for certain architectures.

#[cfg(not(any(target_os = "windows", target_os = "android", target_vendor = "apple",)))]
pub use _frida_g_object_unref as g_object_unref;

While in the following drops, it calls without performing the target check.

impl Drop for ModuleMap {
fn drop(&mut self) {
unsafe { gum_sys::g_object_unref(self.module_map as *mut c_void) }
}
}

impl<'a> Drop for Transformer<'a> {
fn drop(&mut self) {
unsafe { frida_gum_sys::g_object_unref(self.transformer as *mut c_void) }
}
}

impl<'a> Drop for Stalker<'a> {
fn drop(&mut self) {
unsafe { gum_sys::g_object_unref(self.stalker as *mut c_void) };
}
}

@SajjadPourali SajjadPourali changed the title Cannot find function g_object_unref in crate gum_sys frida-gum: Cannot find function g_object_unref in crate gum_sys on aarch64-linux-android Jan 8, 2024
@s1341
Copy link
Contributor

s1341 commented Jan 9, 2024

Thanks for your report. Care to take a stab at a PR to fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants