Open
Description
Steps:
- memleax set breakpoints at the entry of
malloc
andfree
at beginning; - one thread runs in
free
; - memleax catches it, set a breakpoint at the exit of
free
, and deletes the breakpoint at the entry of free temporarily to let the thread continue; - if another thread runs in
free
now, memleax will miss it because the breakpoint is deleted!!! Then this memory block record will live for ever in memleax, and will be considered as a memory leak.
Similarly, if this happens at malloc
, we will miss a memory block allocation.