bytedance / bhook

:fire: ByteHook is an Android PLT hook library which supports armeabi-v7a, arm64-v8a, x86 and x86_64.
https://github.com/bytedance/bhook/tree/main/doc#readme
MIT License
2.05k stars 315 forks source link

是否遗漏了self->cfi_hook_lock的destroy操作 #45

Closed Mr-JingShi closed 2 years ago

Mr-JingShi commented 2 years ago

bytehook Version

1.0.0

Android OS Version

10.0

Android ABIs

armeabi-v7a

Device Manufacturers and Models

Google Pixel 3

Describe the Bug

https://github.com/bytedance/bhook/blob/8bb793317ba037e9aefcab1d2da8a8f0d94fde1e/bytehook/src/main/cpp/bh_elf.c#L283

老师你好,这个地方是否遗漏了self->cfi_hook_lock的destroy操作?

pthread_mutex_destroy(&(*self)->hook_lock);

ifdef LP64

pthread_mutex_destroy(&(*self)->cfi_hook_lock);

endif

pthread_mutex_destroy(&(*self)->dyn_parse_lock);

caikelun commented 2 years ago

是的。感谢反馈,我们在下个版本修复。