This is the mail archive of the
mailing list for the GCC project.
[Bug c++/29517] New: Exception handling not thread-safe on AIX5.x with Gnu compilers
- From: "Ulrich dot Beingesser at t-systems dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Oct 2006 16:43:51 -0000
- Subject: [Bug c++/29517] New: Exception handling not thread-safe on AIX5.x with Gnu compilers
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Ulrich dot Beingesser at t-systems dot com