Krishnendu Chatterjee, Luca de Alfaro, Vishwanath Raman, Cesar Sanchez
08/04/2009 09:00 AM
Computer Engineering
We introduce a technique for debugging multi-threaded C
programs and analyzing the impact of source code changes, and its implementation in the prototype tool Direct. Our approach uses a combination of source code instrumentation and runtime management. The source code along with a test harness is instrumented to monitor Operating System (OS) and user deï¬ned function calls. All concurrency control primitives are tracked through the OS functions. Optionally, Direct can track some concurrency related data of interest. Direct keeps track of an abstract global state that combines the abstract states of every thread, including the sequence of function calls and concurrency primitives executed. The runtime manager can insert delays, provoking thread interleavings that may exhibit bugs, and that may be difficult to reach otherwise. The runtime manager collects an approximation of the reachable state space and uses this approximation to assess the impact of change in a new version of the program.