这是indexloc提供的服务,不要输入任何密码
Skip to content

hook 递归调用的函数崩溃 #10

@qq6r

Description

@qq6r

ShadowHook Version

1.0.3

Android OS Version

8.0.1

Android ABIs

arm64-v8a

Device Manufacturers and Models

Samung Galaxy

Describe the Bug

正常情况下函数调用链 A->B->C->B->.....,此时hook B函数,hook的函数体没有做任何操作,直接调用原始方法,在经过C再次进入B之后崩溃,实际hook的是libart的DexFile::Open
错误信息:
2022-06-16 09:25:18.291 A/DEBUG: signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0x7a02bbf204
2022-06-16 09:25:18.291 A/DEBUG: x0 0000000000000001 x1 000000000000008c x2 00000079f580e7a8 x3 000000008bd76d86
2022-06-16 09:25:18.291 A/DEBUG: x4 00000079f580e7a0 x5 0000000000000000 x6 0000000000000000 x7 0000007fe61a09e8
2022-06-16 09:25:18.291 A/DEBUG: x8 0000007a02bbf200 x9 0000000000000001 x10 000000000000019f x11 0000000000000003
2022-06-16 09:25:18.291 A/DEBUG: x12 0000007a0060d708 x13 2e7265746c696631 x14 000d7c633a084230 x15 0000a8a620ea48ae
2022-06-16 09:25:18.291 A/DEBUG: x16 0000007a00eb3cc0 x17 00000079d6834608 x18 0000000000000000 x19 0000007fe61a09e8
2022-06-16 09:25:18.291 A/DEBUG: x20 00000079f580e7a0 x21 0000007fe61a09d8 x22 0000007a0277e0f4 x23 0000007a0277e048
2022-06-16 09:25:18.291 A/DEBUG: x24 0000007fe61a0bc0 x25 0000007a0277e048 x26 0000000000000001 x27 0000007a006d78a0
2022-06-16 09:25:18.291 A/DEBUG: x28 0000007a0277e0f4 x29 0000007fe61a0990 x30 0000007a003b6fcc
2022-06-16 09:25:18.291 A/DEBUG: sp 0000007fe61a0960 pc 0000007a02bbf204 pstate 0000000000000000
2022-06-16 09:25:18.291 A/DEBUG: backtrace:
2022-06-16 09:25:18.291 A/DEBUG: #00 pc 0000000000000204 [anon:shadowhook-enter:0000007a02bbf000]
2022-06-16 09:25:18.292 A/DEBUG: #1 pc 000000000004afc8 /system/lib64/libart.so (offset 0x358000)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions