high6 Posted April 19, 2009 Posted April 19, 2009 If I patch code that a thread could be executing, should I pause the thread first? Or is it safe as long as I use "REP MOVS DWORD PTR ES:[EDI],DWORD PTR DS:[ESI]"? I know using a forloop would definitely cause problems.
Killboy Posted April 20, 2009 Posted April 20, 2009 I think you should pause first. Not sure what happens when you pause, patch and resume the thread while it's executing that code.
metr0 Posted April 20, 2009 Posted April 20, 2009 Agree to K, and I'm not sure about the second part - though I remember something about the CPU caching the instruction currently being executed (that theory is supported by the existence of a FlushInstructionCache API).
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now