Posted April 19, 200916 yr 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.
April 20, 200916 yr I think you should pause first. Not sure what happens when you pause, patch and resume the thread while it's executing that code.
April 20, 200916 yr 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).
Create an account or sign in to comment