`detour_skip_jmp` for arm64 doesn't support unconditional branch
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 6.4k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hello! I found that there is almost the same issue as https://github.com/microsoft/Detours/issues/293 with DetourCodeFromPointer on arm64. It doesn't work properly for OutputDebugStringA, because detour_skip_jmp doesn't support unconditional jump B <label>. As a result, when you try to hook OutputDebugStringA you are actually hooking kernel32.dll!OutputDebugStringAStub instead of the KernelBase.dll!OutputDebugStringA.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/detours.cpp at detour_skip_jmp, around line 1049, and inspect how ARM64 jumps are handled. Reproduce the OutputDebugStringA hooking case and verify that unconditional B branches resolve to KernelBase.dll!OutputDebugStringA rather than the stub; add or run the relevant ARM64 coverage if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100