This is the mail archive of the 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 c++/29517] New: Exception handling not thread-safe on AIX5.x with Gnu compilers

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

           Summary: Exception handling not thread-safe on AIX5.x with Gnu
           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

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