Int 3 causes System Interrupt process to 95% CPU usage
amirkhansinga
6
Reputation points
I developed a Visual C++ using Toolset 2019 (v142) program which uses an _asm { int 3 } block to detect if it is running under a debugger context.
bool CheckDebug()
{
bool hayDebug = false;
__try
{
_asm
{
int 3
}
hayDebug = true;
}
__except (GetExceptionCode() == EXCEPTION_BREAKPOINT ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
{
hayDebug = false;
}
return hayDebug;
}
In hundreds of computers running services Windows 10, 8.1 and 7 it works well, but in several computers that instruction causes the System Interrupt process to get 95% to 100% of CPU usage, and the program stops running without kill his own process. I checked thast using Process Explorer. If I remove that instruction, the program runs well in all computers. Can you tell me why this occurs?
Note: The issue has been resolved.