Article ID: 281446 - Last Review: August 7, 2007 - Revision: 3.5 FIX: Access violation with std::map::erase or std::set::erase in a multithreaded applicationThis article was previously published under Q281446 On This PageSYMPTOMS
When you call the std::map::erase and std::set::erase member functions at the same time from multiple threads, an access violation may be generated.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section. This bug has been fixed in Microsoft Visual Studio 6.0 Service Pack 5 (SP5). To download the latest service pack for Visual Studio, visit the Visual Studio Product Updates page at the following Microsoft Web site: http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx
(http://msdn2.microsoft.com/en-us/vstudio/Aa718353.aspx)
MORE INFORMATION
The bug was introduced in Visual Studio 6.0 Service Pack 4 (SP4) when the bug that is documented in Q248477 was corrected: For more information, click the following article number to view the article in the Microsoft Knowledge Base: 248477
(http://support.microsoft.com/kb/248477/
)
FIX: Two threads may deadlock when you use the STL map or set in a multithreaded application
Steps to Reproduce BehaviorThe following sample code demonstrates the bug: | Article Translations
|

Back to the top
