Adaptive granularity refinement in detecting potential data races
View Patent ↗A method and apparatus are provided for detecting data races that overcome the limitations of the prior art. In some embodiments, this is accomplished by detecting a first access to an object, determining whether the first access is associated with a suspicious pattern, automatically refining a pattern detection granularity from the object to a memory location within the object if a determination is made that the first access is associated with the suspicious pattern, and reporting the data race if a second access associated with the suspicious pattern occurs at the memory location after the pattern detection granularity is refined.
1. A system for detecting a data race, comprising:
a memory having stored therein computer-executable instructions for storing an object and a memory location within the object;
a computer processor that executes the computer-executable instructions; and
logic configured to detect a first access to the object, determine whether the first access is associated with a suspicious pattern, and refine a pattern detection granularity from the object to the memory location within the object if a determination is made that the first access is associated with the suspicious pattern.
2. The system of claim 1 , wherein the logic is further configured to report the data race if a second access associated with the suspicious pattern occurs at the memory location after the pattern detection granularity is refined.
3. A computer-readable storage medium with computer-executable instructions stored thereon for:
detecting a first access to an object;
determining whether the first access is associated with a suspicious pattern; and
refining a pattern detection granularity from the object to a memory location within the object if a determination is made that the first access is associated with the suspicious pattern.
4. The computer-readable storage medium of claim 3 , further comprising computer-executable instructions for:
reporting the data race if a second access associated with the suspicious pattern occurs at the memory location after the pattern detection granularity is refined.