I am writing a PinTool, which can manipulate certain register/memory value. However, after manipulation, one challenge I am facing now, is the
In particular, due to the frequent manipulation of certain register value, it is indeed common to create
deadloop in the execution trace. I am thinking to detect such case, and terminate the execution.
So here is my question, what is a good practice to detect a
deadloop in a PinTool? I can come up with some naive solutions, say, record the executed instructions, and if certain instruction has been executed for a large amount of times, just terminate the execution.
Could anyone help me on this issue? Thank you.