Article ID: 281446 - View products that this article applies to.
This article was previously published under Q281446
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.
Microsoft 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:
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:
(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 ID: 281446 - Last Review: August 7, 2007 - Revision: 3.5
Contact us for more help
Connect with Answer Desk for expert help.