From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13651 invoked by alias); 20 Feb 2003 16:06:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 13614 invoked by uid 71); 20 Feb 2003 16:06:01 -0000 Date: Thu, 20 Feb 2003 16:06:00 -0000 Message-ID: <20030220160601.13613.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Stephen M. Webb" Subject: Re: libstdc++/9756: __verbose_terminate_handler enters infinite loop Reply-To: "Stephen M. Webb" X-SW-Source: 2003-02/txt/msg00993.txt.bz2 List-Id: The following reply was made to PR libstdc++/9756; it has been noted by GNATS. From: "Stephen M. Webb" To: Phil Edwards Cc: gcc-gnats@gcc.gnu.org Subject: Re: libstdc++/9756: __verbose_terminate_handler enters infinite loop Date: Thu, 20 Feb 2003 11:01:23 -0500 On February 19, 2003 05:04 pm, Phil Edwards wrote: > > >How-To-Repeat: > > > > echo "int main() { throw 0; }" > dc.cpp > > g++ -o dc dc.cpp > > ./dc > > ^C > > I can't reproduce this. I can't see how it's anything unique I've done, since gcc was built from unmodified CVS sources for both my 3.2 and 3.4 versions. Is it possible the problem comes from binutils (I'm using 2.13.90 20021125 for gcc 3.4) or libc (I have 2.2.5)? When I compile with gcc 3.2, I get expected behaviour: stephen_[153]> g++ -v Reading specs from /opt/gnu/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs Configured with: ../combined/configure --enable-languages=c++ --prefix=/opt/gnu --enable-threads Thread model: posix gcc version 3.2 20020326 (experimental) stephen_[154]> g++ -o dc dc.cpp stephen_[155]> ./dc Abort stephen_[156]> When I compile with yesterday's main trunk CVS (actually, it goes back a ways before yesterday), I get the following unexpected behaviour. stephen_[1033]> g++ -v Reading specs from /smw/gnu/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs Configured with: /home/stephenw/gnu/gcc/configure --prefix=/smw/gnu --enable-threads --enable-languages=c++ Thread model: posix gcc version 3.4 20030219 (experimental) stephen_[1034]> g++ -o dc dc.cpp stephen_[1035]> ./dc terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' terminate called after thro^C stephen_[1036]> A gdb session reveals the following stack trace. .... terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' terminate called after throwing an instance of 'int' Program received signal SIGINT, Interrupt. 0x401c1184 in __libc_write () at __libc_write:-1 -1 __libc_write: No such file or directory. in __libc_write (gdb) bt #0 0x401c1184 in __libc_write () at __libc_write:-1 #1 0x400cfd18 in __JCR_LIST__ () from /smw/gnu/lib/libstdc++.so.6 #2 0x400acbf5 in __cxxabiv1::__terminate(void (*)()) ( handler=0x400aef50 <__gnu_cxx::__verbose_terminate_handler()>) at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:43 #3 0x400acc32 in std::terminate() () at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:53 #4 0x400ace0d in __cxa_rethrow () at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/eh_throw.cc:104 #5 0x400af034 in __gnu_cxx::__verbose_terminate_handler() () at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/vterminate.cc:81 #6 0x400acbf5 in __cxxabiv1::__terminate(void (*)()) ( handler=0x400aef50 <__gnu_cxx::__verbose_terminate_handler()>) at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:43 #7 0x400acc32 in std::terminate() () at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:53 .... #10212 0x400ace0d in __cxa_rethrow () at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/eh_throw.cc:104 #10213 0x400af034 in __gnu_cxx::__verbose_terminate_handler() () at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/vterminate.cc:81 #10214 0x400acbf5 in __cxxabiv1::__terminate(void (*)()) ( handler=0x400aef50 <__gnu_cxx::__verbose_terminate_handler()>) at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:43 #10215 0x400acc32 in std::terminate() () at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:53 #10216 0x400ace0d in __cxa_rethrow () at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/eh_throw.cc:104 #10217 0x400af034 in __gnu_cxx::__verbose_terminate_handler() () at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/vterminate.cc:81 #10218 0x400acbf5 in __cxxabiv1::__terminate(void (*)()) ( handler=0x400aef50 <__gnu_cxx::__verbose_terminate_handler()>) at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:43 #10219 0x400acc32 in std::terminate() () at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:53 #10220 0x400acdc2 in __cxa_throw (obj=0x400b7d59, tinfo=0x2d, dest=0x2d) at /home/stephenw/gnu/gcc/libstdc++-v3/libsupc++/eh_throw.cc:80 #10221 0x080484fe in main () #10222 0x40119472 in __libc_start_main (main=0x80484c4
, argc=1, ubp_av=0x804a660, init=0x804839c <_init>, fini=0x40013d8c <_dl_debug_mask>, rtld_fini=0x400b7fc0 , stack_end=0x30) at ../sysdeps/generic/libc-start.c:129 (gdb) -- Stephen M. Webb