public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading
@ 2004-09-24 22:05 lothar at xcerla dot com
  2004-09-24 23:44 ` [Bug libstdc++/17664] " pinskia at gcc dot gnu dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: lothar at xcerla dot com @ 2004-09-24 22:05 UTC (permalink / raw)
  To: gcc-bugs

There is a (multithreaded) condition where the STL behaves different if 
compiled with or without _GLIBCXX_DEBUG. If _GLIBCXX_DEBUG is defined the 
attached program crashes. To compile the attached program the ACE 
(http://www.cs.wustl.edu/~schmidt/ACE.html) library which can be downloaded at 
http://deuce.doc.wustl.edu/Download.html is needed. 
 
I suspect that the iterators make some modifications on the map they iterate 
on if _GLIBCXX_DEBUG is defined. This leads to different (and in this case 
erroneous) behavior in multithreaded applications. 
 
Lothar 
 
--------------------------------- cut --------------------------------------- 
/* 
# compile without _GLIBCXX_DEBUG 
lothar@janus-w$ g++ -V 3.4.1 -O0 -g -I ${ACE_ROOT}/ -L ${ACE_ROOT}/lib/ -lACE 
-lstdc++ -lpthread -lrt -ldl bug.cpp -o bug 
lothar@janus-w$ LD_LIBRARY_PATH=${ACE_ROOT}/lib ./bug 
lothar@janus-w$ 
 
# compile with _GLIBCXX_DEBUG but guard with a write lock 
lothar@janus-w$ g++ -V 3.4.1 -O0 -g -D_GLIBCXX_DEBUG -I ${ACE_ROOT}/ -L 
${ACE_ROOT}/lib/ -lACE -lstdc++ -lpthread -lrt -ldl bug.cpp -o bug 
lothar@janus-w$ LD_LIBRARY_PATH=${ACE_ROOT}/lib ./bug 
lothar@janus-w$ 
 
# compile with _GLIBCXX_DEBUG (crashes) 
lothar@janus-w$ g++ -V 3.4.1 -O0 -g -D_GLIBCXX_DEBUG -DCRASH -I ${ACE_ROOT}/ 
-L ${ACE_ROOT}/lib/ -lACE -lstdc++ -lpthread -lrt -ldl bug.cpp -o bug 
bug.cpp:19:2: warning: #warning will crash 
lothar@janus-w$ LD_LIBRARY_PATH=${ACE_ROOT}/lib ./bug 
Segmentation fault 
lothar@janus-w$ 
 
*/ 
 
#include <algorithm> 
#include <map> 
 
#include "ace/Task.h" 
#include "ace/Barrier.h" 
 
#define PROTECT 1 
#ifdef _GLIBCXX_DEBUG 
#ifdef CRASH 
#undef PROTECT 
#define PROTECT 0 
#warning will crash 
#endif /* CRASH */ 
#endif /* _GLIBCXX_DEBUG */ 
 
class MapTask 
: 
  public ACE_Task_Base 
{ 
  public: 
    MapTask( 
      unsigned long cnt, 
      unsigned long threadCnt 
    ) 
    : 
      m_barrier(threadCnt+1), 
      m_id(0), 
      m_failed(0), 
      m_cnt(cnt), 
      m_threadCnt(threadCnt) 
    { 
      for(cnt = 0; cnt < m_cnt; ++cnt) 
      { 
        m_map[cnt] = 0; 
      } 
       
      this->activate( 
        THR_NEW_LWP|THR_JOINABLE|THR_INHERIT_SCHED, 
        m_threadCnt 
      ); 
    } 
   
    ~MapTask() 
    { 
    } 
   
    virtual int init (int argc, char *argv[]) 
    { 
      m_barrier.wait(); 
      return 0; 
    } 
     
    virtual int fini (void) 
    { 
      this->wait(); 
      return 0; 
    } 
     
    unsigned failed ( ) 
    { 
      return m_failed.value(); 
    } 
     
    virtual int svc (void) 
    { 
      long id = m_id++;       
       
      m_barrier.wait(); 
 
      try 
      { 
        for(int cnt = 0; cnt < m_cnt; ++cnt) 
        { 
          if(id % 2) 
          { 
            WriteGuard guard(m_mutex); 
            m_map[cnt] += 1; 
          } 
           
          std::map<int,int>::const_iterator iter = m_map.end(); 
          { 
            ReadGuard guard(m_mutex); 
            iter = m_map.find(cnt); 
          } 
           
          if(iter == m_map.end()) 
          { 
            ++m_failed; 
          } 
          else 
          { 
            unsigned long value = 0; 
            do 
            { 
              value += iter->second; 
              { 
                // we have to guard the iterator movement 
                // in the debug builds due to _GLIBCXX_DEBUG 
#if PROTECT 
                WriteGuard guard(m_mutex); 
#endif /* PROTECT */ 
                ++iter; 
              } 
            }while(iter != m_map.end()); 
          } 
          ACE_OS::sleep(ACE_Time_Value(0,10)); 
        } 
      } 
      catch(...) 
      { 
        return -1; 
      } 
 
      return 0; 
    } 
         
  private: 
    typedef ACE_Read_Guard < ACE_RW_Thread_Mutex >   ReadGuard; 
    typedef ACE_Write_Guard < ACE_RW_Thread_Mutex >  WriteGuard; 
     
    ACE_Thread_Barrier                                 m_barrier; 
    ACE_RW_Thread_Mutex                                m_mutex; 
    ACE_Atomic_Op <ACE_Thread_Mutex, unsigned long>    m_id; 
    ACE_Atomic_Op <ACE_Thread_Mutex, unsigned long>    m_failed; 
    std::map<int,int>                                  m_map; 
    unsigned long                                      m_cnt; 
    unsigned long                                      m_threadCnt; 
}; 
 
 
int main () 
{ 
  unsigned int numThreads = 200; 
  unsigned int numIterations = 100; 
   
  // create threads 
  MapTask task(numIterations, numThreads); 
  ACE_OS::sleep(1); 
   
  // run threads 
  task.init(0, 0); 
  // wait for completion 
  task.fini(); 
   
  return 0; 
} /* end of main */ 
 
------------------------------------- cut -----------------------------------

-- 
           Summary: Crash in std::map when using _GLIBCXX_DEBUG with
                    multithreading
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lothar at xcerla dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
@ 2004-09-24 23:44 ` pinskia at gcc dot gnu dot org
  2004-09-25  0:52 ` lothar at xcerla dot com
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-24 23:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-24 23:44 -------
Invalid as std::map is not multithreaded that way (you would have the same problem without 
_GLIBCXX_DEBUG also as it is not done this way for either).  What this is showing you is that you need to 
add the write guard other wise you get a crash or wrong answers without _GLIBCXX_DEBUG.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
  2004-09-24 23:44 ` [Bug libstdc++/17664] " pinskia at gcc dot gnu dot org
@ 2004-09-25  0:52 ` lothar at xcerla dot com
  2004-09-25  0:53 ` lothar at xcerla dot com
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: lothar at xcerla dot com @ 2004-09-25  0:52 UTC (permalink / raw)
  To: gcc-bugs


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
  2004-09-24 23:44 ` [Bug libstdc++/17664] " pinskia at gcc dot gnu dot org
  2004-09-25  0:52 ` lothar at xcerla dot com
@ 2004-09-25  0:53 ` lothar at xcerla dot com
  2004-09-28  9:59 ` pcarlini at suse dot de
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: lothar at xcerla dot com @ 2004-09-25  0:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lothar at xcerla dot com  2004-09-25 00:52 -------
oops I wanted reopen, not verify 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|VERIFIED                    |UNCONFIRMED
         Resolution|INVALID                     |


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
                   ` (2 preceding siblings ...)
  2004-09-25  0:53 ` lothar at xcerla dot com
@ 2004-09-28  9:59 ` pcarlini at suse dot de
  2004-10-07  3:53 ` bkoz at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pcarlini at suse dot de @ 2004-09-28  9:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pcarlini at suse dot de  2004-09-28 09:59 -------
Hi. I agree that something, somewhere, seems fishy in debug mode vs MT: we'll
see... However, your testcase involves ++iter *not* iter++ ;) 

-- 


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
                   ` (3 preceding siblings ...)
  2004-09-28  9:59 ` pcarlini at suse dot de
@ 2004-10-07  3:53 ` bkoz at gcc dot gnu dot org
  2004-10-07 16:16 ` lothar at xcerla dot com
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-10-07  3:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2004-10-07 03:53 -------

Lothar, do you have specific source lines, or a patch you can propose? That
would probably speed things up.

Your test program is quite large. Is there anyway to reproduce this without all
of ACE? If so, that also would be useful.

-benjamin



-- 


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
                   ` (4 preceding siblings ...)
  2004-10-07  3:53 ` bkoz at gcc dot gnu dot org
@ 2004-10-07 16:16 ` lothar at xcerla dot com
  2004-11-01 20:42 ` bkoz at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: lothar at xcerla dot com @ 2004-10-07 16:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From lothar at xcerla dot com  2004-10-07 16:16 -------
 
No, unfortunaltely I had no time to do further work. It is also a lot of work 
(at least for me) to replace ACE and use pthreads natively, as ACE provides a 
lot of wonderful abstractions (that keep the code shorter than with native 
calls). However, if you are on Linux and don't want to compile ACE yourself, 
there's packages (deb, rpm) as well. Just google for them. Once you have ACE 
compiling and running the example is easy (it contains the compile and link 
command lines). 
 
Our "workaround" currently is simply not to use "_GLIBCXX_DEBUG". 
 
I think basically the problem is clear. As the debug versions of the 
containers/iterators access some shared data in the MT case (the iterator 
(de)registration is one such case) This data has to be protected by a mutex or 
something similar. However I had no time to create a patch for the code. As 
stated above we just switched to non debug STL for the time being. 
 
Lothar 
 

-- 


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
                   ` (5 preceding siblings ...)
  2004-10-07 16:16 ` lothar at xcerla dot com
@ 2004-11-01 20:42 ` bkoz at gcc dot gnu dot org
  2004-11-01 20:42 ` bkoz at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-11-01 20:42 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bkoz at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
                   ` (6 preceding siblings ...)
  2004-11-01 20:42 ` bkoz at gcc dot gnu dot org
@ 2004-11-01 20:42 ` bkoz at gcc dot gnu dot org
  2004-11-02  5:48 ` bkoz at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-11-01 20:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2004-11-01 20:42 -------
Created an attachment (id=7454)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7454&action=view)
proposed patch


Here's how you'd fix it by adding mutexes. I don't know if all of these are
necessary, because I haven't bothered to reproduce it. If you can test this
patch and see if it fixes your fail I'd appreciate it.

Is there a way to get this to fail without ACE?

-benjamin


-- 


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
                   ` (7 preceding siblings ...)
  2004-11-01 20:42 ` bkoz at gcc dot gnu dot org
@ 2004-11-02  5:48 ` bkoz at gcc dot gnu dot org
  2004-11-02 23:45 ` bkoz at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-11-02  5:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2004-11-02 05:48 -------
Mine.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bkoz at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
                   ` (8 preceding siblings ...)
  2004-11-02  5:48 ` bkoz at gcc dot gnu dot org
@ 2004-11-02 23:45 ` bkoz at gcc dot gnu dot org
  2004-11-03 12:24 ` [Bug libstdc++/17664] [3.4 only] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-11-02 23:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2004-11-02 23:45 -------

Compiled like so, after setting LD_LIBRARY_PATH to ACE libs:
g++ -g -O2 -pthread -I$bld/H-x86-ACE/include -L$bld/H-x86-ACE/lib -lACE 17664.cc

As suspected, only the safe_iterator bits in the original patch needed to go in.

However, this did fix this stuff up. I'm checking into head, will fix for 3.4.4.

-benjamin


-- 


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] [3.4 only] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
                   ` (9 preceding siblings ...)
  2004-11-02 23:45 ` bkoz at gcc dot gnu dot org
@ 2004-11-03 12:24 ` pinskia at gcc dot gnu dot org
  2004-11-08 20:47 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-03 12:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-03 12:24 -------
Fixed on the mainline, queued for 3.4.4.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.0.0
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-03 12:24:25
               date|                            |
            Summary|Crash in std::map when using|[3.4 only] Crash in std::map
                   |_GLIBCXX_DEBUG with         |when using _GLIBCXX_DEBUG
                   |multithreading              |with multithreading
   Target Milestone|---                         |3.4.4


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] [3.4 only] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
                   ` (10 preceding siblings ...)
  2004-11-03 12:24 ` [Bug libstdc++/17664] [3.4 only] " pinskia at gcc dot gnu dot org
@ 2004-11-08 20:47 ` cvs-commit at gcc dot gnu dot org
  2004-11-08 20:50 ` bkoz at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-11-08 20:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-11-08 20:47 -------
Subject: Bug 17664

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bkoz@gcc.gnu.org	2004-11-08 20:47:25

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/src: debug.cc 

Log message:
	2004-11-08  Benjamin Kosnik  <bkoz@redhat.com>
	Doug Gregor  <dgregor@cs.indiana.edu>
	
	PR libstdc++/17664
	* src/debug.cc: Just use one mutex.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2756&r2=1.2757
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/src/debug.cc.diff?cvsroot=gcc&r1=1.9&r2=1.10



-- 


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] [3.4 only] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
                   ` (12 preceding siblings ...)
  2004-11-08 20:50 ` bkoz at gcc dot gnu dot org
@ 2004-11-08 20:50 ` bkoz at gcc dot gnu dot org
  2004-11-08 21:11 ` cvs-commit at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-11-08 20:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2004-11-08 20:50 -------
Fixed mainline, 3.4.branch

-- 


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] [3.4 only] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
                   ` (11 preceding siblings ...)
  2004-11-08 20:47 ` cvs-commit at gcc dot gnu dot org
@ 2004-11-08 20:50 ` bkoz at gcc dot gnu dot org
  2004-11-08 20:50 ` bkoz at gcc dot gnu dot org
  2004-11-08 21:11 ` cvs-commit at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2004-11-08 20:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bkoz at gcc dot gnu dot org  2004-11-08 20:50 -------
Fixed

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libstdc++/17664] [3.4 only] Crash in std::map when using _GLIBCXX_DEBUG with multithreading
  2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
                   ` (13 preceding siblings ...)
  2004-11-08 20:50 ` bkoz at gcc dot gnu dot org
@ 2004-11-08 21:11 ` cvs-commit at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-11-08 21:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-11-08 21:10 -------
Subject: Bug 17664

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	bkoz@gcc.gnu.org	2004-11-08 21:10:17

Modified files:
	libstdc++-v3   : ChangeLog 
	libstdc++-v3/src: debug.cc 

Log message:
	2004-11-08  Benjamin Kosnik  <bkoz@redhat.com>
	Doug Gregor  <dgregor@cs.indiana.edu>
	
	PR libstdc++/17664
	* src/debug.cc : Just use one mutex.
	
	2004-11-08  Benjamin Kosnik  <bkoz@redhat.com>
	Lothar Werzinger  <lothar@xcerla.com>
	
	PR libstdc++/17664
	* src/debug.cc: Include concurrence, use mutexes.
	(_Safe_iterator_base::_M_attach): Here.
	(_Safe_iterator_base::_M_detach): Here.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2224.2.197&r2=1.2224.2.198
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/src/debug.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3.10.4&r2=1.3.10.5



-- 


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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-11-08 21:11 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-24 22:05 [Bug libstdc++/17664] New: Crash in std::map when using _GLIBCXX_DEBUG with multithreading lothar at xcerla dot com
2004-09-24 23:44 ` [Bug libstdc++/17664] " pinskia at gcc dot gnu dot org
2004-09-25  0:52 ` lothar at xcerla dot com
2004-09-25  0:53 ` lothar at xcerla dot com
2004-09-28  9:59 ` pcarlini at suse dot de
2004-10-07  3:53 ` bkoz at gcc dot gnu dot org
2004-10-07 16:16 ` lothar at xcerla dot com
2004-11-01 20:42 ` bkoz at gcc dot gnu dot org
2004-11-01 20:42 ` bkoz at gcc dot gnu dot org
2004-11-02  5:48 ` bkoz at gcc dot gnu dot org
2004-11-02 23:45 ` bkoz at gcc dot gnu dot org
2004-11-03 12:24 ` [Bug libstdc++/17664] [3.4 only] " pinskia at gcc dot gnu dot org
2004-11-08 20:47 ` cvs-commit at gcc dot gnu dot org
2004-11-08 20:50 ` bkoz at gcc dot gnu dot org
2004-11-08 20:50 ` bkoz at gcc dot gnu dot org
2004-11-08 21:11 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).