This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/17664] Crash in std::map when using _GLIBCXX_DEBUG with multithreading


------- Additional Comments From lothar at xcerla dot com  2004-09-25 00:52 -------
I did some reading in the source and the culprit is that _M_attach, 
_M_detach, ... are not thread safe. as iter++ creates a temporary iterator 
(that has to attach and detach) and they access the (shared) map, it failes in 
the multithreaded case. As these calls are ONLY executed when _GLIBCXX_DEBUG 
is defined, the program only fails there. 
 
I think this clearly IS a bug and should be solved by protecting the 
_M_attach, _M_detach, ... methods with a mutex. 
 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17664


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]