KindDragon / vld

Visual Leak Detector for Visual C++ 2008-2015
https://kinddragon.github.io/vld/
GNU Lesser General Public License v2.1
1.01k stars 316 forks source link

fix: blockinfo can be changed after being extracted #26

Open rglarix opened 7 years ago

rglarix commented 7 years ago

~CaptureContext obtains a blockinfo_t from map/remapBlock, then adds callstack information to it. But in multithreaded programs another thread could change blockinfo informations. This patch moves locks on g_heapMapLock to ~CaptureContext and reorders callstack collection before the lock