Patent ID: 8539450

Claim:
A context-sensitive method for analyzing a concurrent program stored in memory, which employs asynchronous function calls for communication and/or recursion, comprising: constructing a control flow graph, using a processor, based on a context-sensitive pointer analysis, wherein upon encountering a function pointer, a points-to set of the function pointer is resolved dynamically on-the-fly in a context-sensitive fashion to accurately determine a set of potential function calls; terminating the context-sensitive control flow graph construction when no new potential function calls are encountered that potentially contribute new data races that are not already discovered in existing contexts; and detecting data races in the concurrent program using the context-sensitive control flow graph which is constructed to not miss any potential data race by determining concurrent accesses under lock synchronization and program order constraints by obtaining context-sensitive locksets at each shared variable access location and checking if a predetermined pair of shared accesses has a common lock in corresponding locksets for all possible contexts and removing the predetermined pair of locations from a warning database.