The attached code crashes under AIX5.2 and AIX5.3 when compiled with g++ 4.1.1.
The effect also occurs using g++ 4.0.3.

It seems that throwing exceptions is not completely thread safe.

The crash symptom is one of:
1. segmentation fault (core dumped)
2. illegal instruction (core dumped)
3. terminate called after throwing an instance of 'int' (core dumped). 

The effect cannot clearly be reproduced.
However when running the test program (crashme.cpp) with rather big parameter
values
one can proove that the program crashes very often after some time if the
params are choosen big enough.

The program was build with following command:
g++ crashme.cpp -o crashme -lpthread

Usage: crashme <number of threads> <number of runs>

For example 'crashme 50 1000' was enough to crash it on our box almost every
time.


-- 
           Summary: Exception handling not thread-safe on AIX5.x with Gnu
                    compilers
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Ulrich dot Beingesser at t-systems dot com


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

Reply via email to