Azure / vld

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

data race fix #29

Open OleksiiiSemko opened 9 months ago

OleksiiiSemko commented 9 months ago

Fix of the https://github.com/Azure/vld/issues/28 issue. The Callstack structure is reset inside the CaptureContext destructor and deleted inside the unmap method. CaptureContext destructor and unmap method can be called in separate threads but std::unordered_map restore method is not threadsafe and the call is not protected by the critical section, because of this the Callstack destructor can be called twice for the same object.

Neustradamus commented 3 weeks ago

@OleksiiiSemko, @mattdurak: Any progress on it?

mattdurak commented 3 weeks ago

Seems safe, likely we would need to validate it for our use case, FYI @dcristoloveanu