MIT researchers have developed an experimental software framework called Jolt that allows applications to recover in some cases when they hang. When Jolt detects that a program is stuck in a certain kind of infinite loop, it can force it to exit the loop and continue executing.
The researchers have published a paper that describes their implementation of Jolt and how it performed in a number of tests against bugs in well-known open source software utilities. In several test cases, Jolt allowed hung programs to continue to completion in situations where the user would otherwise have to forcefully terminate the process.
The inspiration for the research project came from a bug in Microsoft Word. An MIT professor was writing a document in the word processor one morning when it froze unexpectedly. Using a debugging tool, he found the loop in which the program was stuck and forced it to move on, allowing him to save his document and restart the program. He described the incident in an e-mail to his colleague, Professor Martin Rinard, who then got the idea of building an automated tool for breaking out of infinite loops.
The idea is compelling, but the initial implementation comes with some caveats. The method that Jolt uses to identify infinite loops is very limited. Jolt compares the program’s state during each iteration of a loop to determine if the values are changing. If the program’s state remains the same between iterations, Jolt will cause the program to branch out of the loop so that execution can continue.
Jolt isn’t effective in cases where the operations within a loop are changing the program’s state but not changing it in ways that fulfill the loop’s natural exit condition. Another issue is that Jolt can’t identify infinite loops that are caused by recursive function calls.
In order for Jolt to work properly, the source code of an application has to be modified during compilation to inject function calls for tracking loop entry and exit. To accomplish this, the researchers built on the Low Level Virtual Machine (LLVM) compiler infrastructure and added a step to perform the necessary modifications to the code. It also adds a label outside of each loop to indicate where the execution should be picked back up when Jolt causes the program to exit the loop.

Loading comments...