Skip to content

ByteHook v1.0.2

Compare
Choose a tag to compare
@caikelun caikelun released this 03 Sep 10:41
· 67 commits to main since this release
v1.0.2
cb869ce

Bugs fixed

Fix a crash in manual mode

In manual mode, the caller needs to save the original function address in the hooked callback first, and then we can replace the address in the GOT. Otherwise, it may crash due to timing issues. So we added an additional callback (status code is BYTEHOOK_STATUS_CODE_ORIG_ADDR) to the manual mode to allow the caller to save the original function address.

Thanks to the contributors from iQiyi Video.

Fix a deadlock bug

If dlopen or dlclose in .init_array or .fini_array, a deadlock may occur between linker-mutex and dlclose-proxy-rwlock.

Thanks to the contributors from iQiyi Video and Toutiao.

Bugs 修复

修复手动模式的崩溃

在手动模式中,调用者首先需要在 hooked 回调中保存原函数地址,然后我们才能替换 GOT 中的地址。否则,可能由于时序问题引起崩溃。所以我们在手动模式中,额外增加了一次回调(状态码是 BYTEHOOK_STATUS_CODE_ORIG_ADDR),用于让调用者保存原函数地址。

感谢来自爱奇艺视频的贡献者。

修复一个死锁 bug

如果在 .init_array.fini_array 中存在 dlopendlclose,可能在 linker-mutexdlclose-proxy-rwlock 之间发生死锁。

感谢来自爱奇艺视频和今日头条的贡献者。