Closed 764994703 closed 2 years ago
指令恢复时对如0x54ff6b28 b.hi -0x129d 指令做重定向的offset的计算是错误的。 是由于offset imm19是一个signed值,但代码中__fix_cond_comp_test_branch计算absolute_addr将其视为unsigned导致的。
其他几处signed_extend的实现也看起来不太对,可能需要都改成用我这个实现?
感谢, 那里确实没考虑sign-extended的情况, 不过有效位未必是21, 还可能是16, 简单修了: https://github.com/Rprop/And64InlineHook/blob/master/And64InlineHook.cpp#L223
其它地方的好像没问题?未验证
指令恢复时对如0x54ff6b28 b.hi -0x129d 指令做重定向的offset的计算是错误的。 是由于offset imm19是一个signed值,但代码中__fix_cond_comp_test_branch计算absolute_addr将其视为unsigned导致的。