question

amirkhansinga-6399 avatar image
0 Votes"
amirkhansinga-6399 asked amirkhansinga-6399 edited

Int 3 causes System Interrupt process to 95% CPU usage

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.


c++vs-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Does the same thing happen with IsDebuggerPresent Function?


0 Votes 0 ·

0 Answers