You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While porting TF2 extensions to x64, I noticed a hook that was working on x32 started crashing.
I noticed CDetour copied this instruction to the trampoline.
lea rax, [rip + 0xbecbb1]
Since the offset is based on the current program position, the destination obviously becomes invalid if it is moved.
I am not sure if anyone wants to fix this as it seems like a daunting task to detect relative addressing in every possible instruction.
But on the other hand due to x64, more functions like this may lose the normal function prologue that is guaranteed to be free of relative addressing, so it may become a frequent problem. Maybe there's another library besides udis that handles this problem?
The text was updated successfully, but these errors were encountered:
How x64 detours will be tackled is still to be determined. The backend will probably be migrated to a library with better platform/disassembly support.
While porting TF2 extensions to x64, I noticed a hook that was working on x32 started crashing.
I noticed CDetour copied this instruction to the trampoline.
lea rax, [rip + 0xbecbb1]
Since the offset is based on the current program position, the destination obviously becomes invalid if it is moved.
I am not sure if anyone wants to fix this as it seems like a daunting task to detect relative addressing in every possible instruction.
But on the other hand due to x64, more functions like this may lose the normal function prologue that is guaranteed to be free of relative addressing, so it may become a frequent problem. Maybe there's another library besides udis that handles this problem?
The text was updated successfully, but these errors were encountered: