Patent ID: 7992146
Filing Date: 2011-08-02
Classification: G06F

Abstract:
1. A method for detecting race conditions involving heap memory access, comprising: tracking a plurality of threads as the plurality of threads are created and terminated; intercepting a plurality of application programming interfaces (APIs) utilized to create and destroy thread synchronization objects; tracking each of the thread synchronization objects that is created via the plurality of APIs; intercepting a plurality of thread synchronization APIs; creating a bit field that contains a unique bit for each of the tracked thread synchronization objects that is at least one of, (i) used, and (ii) has been used; intercepting and tracking heap memory allocations and deallocations; intercepting heap memory access; comparing an ID of a currently accessing thread accessing a memory block with a last thread ID associated with a last thread to access the memory block, the comparing occurring when the memory block is presently being written to or if at the last access time the memory block was written to; comparing a bit field of a thread synchronization object held by the current accessing thread with a bit field of a last thread synchronization held by the last thread associated with the memory block; recording the current thread call chain if there are no bits in common; and reporting a race condition warning that is displayable to a user having the call chain associated with a current access by the currently accessing thread and a previous accesses by the last thread to the memory block.