Skip to content

arm64 detour throw 0xC000001D: Illegal Instruction. when call the real fn #276

Answered by LeoDavidson
hereafter asked this question in Q&A
Discussion options

You must be logged in to vote

I don't know if this will be the issue, but make sure your replacement function uses the correct calling convention. ARM64 has two conventions, based on this OldNewThing post:

https://devblogs.microsoft.com/oldnewthing/20220823-00/?p=107041

Quick! Click the link before Microsoft break every URL pointing to every developer blogs again, like they do every few months! :-)

x64 only has one calling convention for everything, which I have seen mask mismatches until you try an x86 build (or an ARM64, I suspect).

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@sylveon
Comment options

Answer selected by hereafter
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants