This is the mail archive of the gcc-bugs@gcc.gnu.org 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 target/13391] New: AIX: crash on throw/catch between shared objects


The attached testcase, while quite contrived, illustrates a problem we are
experiencing on AIX with GCC 3.3.2.  Tests suggest that the problem actually
goes back to GCC 2.95.3 or earlier on AIX 4.3, and is not unique to AIX 5.2.

When run, the program fails to catch the exception, and instead aborts.  The
stack trace after the abort is:

#0  0xd005d1c0 in pthread_kill () from /usr/lib/libpthreads.a(shr_xpg5.o)
#1  0xd005cc4c in _p_raise () from /usr/lib/libpthreads.a(shr_xpg5.o)
#2  0xd01e6508 in raise () from /usr/lib/libc.a(shr.o)
#3  0xd0206400 in abort () from /usr/lib/libc.a(shr.o)
#4  0xd49ec01c in __cxxabiv1::__terminate(void (*)()) (handler=<incomplete
type>) at  _start_ :47
#5  0xd49ebfd0 in std::terminate() () at  _start_ :57
#6  0xd49f2bc4 in __cxa_throw (obj=<incomplete type>, tinfo=<incomplete type>, 
    dest=<incomplete type>) at  _start_ :80
#7  0xd47f8630 in TestFun2::foo() (this=0x2ff223a5) at TestThreadFunction2.C:9
#8  0xd460620c in AixThreadFn::execute() (this=0x2ff223f0) at
TestThreadFunction.C:12
#9  0x100005bc in main () at aixtest2.C:11
#10 0x100001dc in __start ()

If you compile without -pthread, you get a very similar traceback:
#0  0xd01e6514 in raise () from /usr/lib/libc.a(shr.o)
#1  0xd0206400 in abort () from /usr/lib/libc.a(shr.o)
#2  0xdc87e01c in __cxxabiv1::__terminate(void (*)()) (handler=<incomplete
type>) at  _start_ :47
#3  0xdc87dfd0 in std::terminate() () at  _start_ :57
#4  0xdc8847d4 in __cxa_throw (obj=<incomplete type>, tinfo=<incomplete type>, 
    dest=<incomplete type>) at  _start_ :80
#5  0xdc68b630 in TestFun2::foo() (this=0x2ff223a5) at TestThreadFunction2.C:9
#6  0xdc49920c in AixThreadFn::execute() (this=0x2ff223f0) at
TestThreadFunction.C:12
#7  0x1000053c in main () at aixtest2.C:11
#8  0x100001dc in __start ()

...only without the pthread signal propagation.

The testcase contains a template which calculates a factorial, in order to
produce very large shared objects.  This is to simulate the size of the shared
objects in our production code; if the shared objects are small, the fault is
not reliably reproducable.

-- 
           Summary: AIX: crash on throw/catch between shared objects
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: greed at pobox dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-ibm-aix5.2.0.0
  GCC host triplet: powerpc-ibm-aix5.2.0.0
GCC target triplet: powerpc-ibm-aix5.2.0.0


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


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