I don't know much about machine code that programs execute as they run, but from various (dis)assembly code snippets that I've seen, I am pretty sure I remember loops are implemented using jump-ifs (JE/JNE). When a program is in an infinite loop, one part of the code must be executed lots and lots of times per second. Like when executing while(true){console.log(".");} in a browser, it will hit an if somewhere over and over again.
I understand that many programs also have a main loop somewhere which will always run during its lifetime, so it's probably quite hard to detect which loop should be broken out of, but from what I understand it seems possible.
Are there any programs able to analyze stuck applications while they are running, and flip the JE to a JNE in the right spot, or something like that? Or are there tools that could help me analyze the situation to decide for myself?
Ideally the answer should be aimed at Linux-based systems, but any OS is of interest to me. Perhaps when knowing the right terms I can google for alteatives myself, or even port the code.
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 229
تاريخ: شنبه
5 تير
1395 ساعت: 3:56