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]

Re: c++/9265: exception handling faulty wenn linking PIC objects to non PIC ones


On Mon, Jan 13, 2003 at 12:14:36AM -0000, bangerth@dealii.org wrote:
>     Hm, I cannot reproduce the problem you have with a recent

Strange.  Which binutils do you use?  I have 2.12.90.0.15 here.

>     snapshot. What is the result for you when you call ./a.out?
>     Is it an abort or a call to terminate()?

It is a call to std::terminate() which leads to an abort then.  On gcc
HEAD revision, a "terminate called after throwing an instance of
'int'" is printed before aborting.

The stack traces are:

gcc 3.[23]

#0  0x4012adf1 in kill () from /lib/libc.so.6
#1  0x4012abd8 in raise () from /lib/libc.so.6
#2  0x4012c4d9 in abort () from /lib/libc.so.6
#3  0x4009d784 in __cxxabiv1::__terminate(void (*)()) (handler=0x4012c340 <abort>) at /home/schiele/gcccvs/gcc-3.2.1/libstdc++-v3/libsupc++/eh_terminate.cc:47
#4  0x4009d7d1 in std::terminate() () at /home/schiele/gcccvs/gcc-3.2.1/libstdc++-v3/libsupc++/eh_terminate.cc:57
#5  0x4009d941 in __cxa_throw () at /home/schiele/gcccvs/gcc-3.2.1/libstdc++-v3/libsupc++/eh_throw.cc:77
#6  0x08048640 in main ()
#7  0x401194a2 in __libc_start_main () from /lib/libc.so.6

gcc 3.4

#0  0x4012cdf1 in kill () from /lib/libc.so.6
#1  0x4012cbd8 in raise () from /lib/libc.so.6
#2  0x4012e4d9 in abort () from /lib/libc.so.6
#3  0x4009fac7 in __gnu_cxx::__verbose_terminate_handler() () at /home/schiele/gcccvs/gcc/libstdc++-v3/libsupc++/vterminate.cc:96
#4  0x4009d8e4 in __cxxabiv1::__terminate(void (*)()) (handler=0x4009fa90 <__gnu_cxx::__verbose_terminate_handler()>)
    at /home/schiele/gcccvs/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:43
#5  0x4009d921 in std::terminate() () at /home/schiele/gcccvs/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:53
#6  0x4009da91 in __cxa_throw () at /home/schiele/gcccvs/gcc/libstdc++-v3/libsupc++/eh_throw.cc:80
#7  0x08048648 in main ()
#8  0x4011b4a2 in __libc_start_main () from /lib/libc.so.6

>     Also, note that with you code you do not make any use of
>     the symbols declared within the second file at all.

Well, this is perfectly clear to me, but it anyway makes a difference.

Robert

-- 
Robert Schiele			Tel.: +49-621-181-2517
Dipl.-Wirtsch.informatiker	mailto:rschiele@uni-mannheim.de

Attachment: msg00318/pgp00000.pgp
Description: PGP signature


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