~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
~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