Invention Grant
- Patent Title: Method for detecting race conditions involving heap memory access
- Patent Title (中): 检测涉及堆内存访问的竞态条件的方法
-
Application No.: US11562830Application Date: 2006-11-22
-
Publication No.: US07992146B2Publication Date: 2011-08-02
- Inventor: Kirk J. Krauss
- Applicant: Kirk J. Krauss
- Applicant Address: US NY Armonk
- Assignee: International Business Machines Corporation
- Current Assignee: International Business Machines Corporation
- Current Assignee Address: US NY Armonk
- Agency: Cantor Colburn LLP
- Agent Daniel McLoughlin
- Main IPC: G06F9/46
- IPC: G06F9/46 ; G06F9/44 ; G06F13/00 ; G06F11/00

Abstract:
A method for detecting race conditions involving heap memory access including a plurality of threads being tracked. At runtime a plurality of APIs utilized to create and destroy thread synchronization objects are intercepted, and each synchronization object created via the APIs is tracked. A bit field is created that contains a unique bit for each synchronization object. Heap memory allocations and deallocations are intercepted and tracked. The heap memory access is intercepted, and at that time, the ID of the accessing thread is compared with the last thread ID associated with that memory block when it was last accessed. If the thread IDs do not match, then the current thread synchronization object bit field is compared with the last synchronization object bit field associated with thread memory block. Provided the bit fields are different, a race condition warning is reported that is displayable to the user having the call chains.
Public/Granted literature
- US20080120627A1 METHOD FOR DETECTING RACE CONDITIONS INVOLVING HEAP MEMORY ACCESS Public/Granted day:2008-05-22
Information query