On multiprocessor Solaris Sparc machines, if multiple threads are concurrently
throwing exceptions, and another thread is calling exit() or returning from
main(), there are messages such as:

   terminate called recursively
   terminate called after throwing an instance of '

And sometimes core is dumped with an abort signal.

I have been able to reproduce this on a number of different gcc versions
(4.2.0, 4.1.2, 2.95.2).  You can find the code I use to reproduce it at:
http://www.csug.rochester.edu/users/ugrads/asveikau/exception_bug.cc  Note that
running it once without incident does not mean the system is unaffected by the
bug; keep running it until it dumps core.

The code runs file on: SunPRO C++ on the affected systems, gcc 4.1.1 on i386
linux, and gcc 3.2.3 on i386 linux.  This is why I concluded that the issue is
specific to either gcc on Solaris or gcc on Sparc.  Since it works fine on
Sun's compiler, I don't think it is Solaris's fault.  I don't have access to
sparc linux or x86 solaris, so I couldn't narrow it down beyond that.


-- 
           Summary: Exception handling crash on multi-threaded Solaris/Sparc
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: a dot l dot sveikauskas at gmail dot com
 GCC build triplet: sparc-sun-solaris2.10, sparc-sun-solaris2.9, sparc-sun-
                    solaris2.
  GCC host triplet: sparc-sun-solaris2.10, sparc-sun-solaris2.9, sparc-sun-
                    solaris2.
GCC target triplet: sparc-sun-solaris2.10, sparc-sun-solaris2.9, sparc-sun-
                    solaris2.


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

Reply via email to