public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Phil Edwards <phil@jaj.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: libstdc++/9756: __verbose_terminate_handler enters infinite loop Date: Thu, 20 Feb 2003 16:26:00 -0000 [thread overview] Message-ID: <20030220162600.22557.qmail@sources.redhat.com> (raw) The following reply was made to PR libstdc++/9756; it has been noted by GNATS. From: Phil Edwards <phil@jaj.com> To: "Stephen M. Webb" <stephenw@cryptocard.com> Cc: gcc-gnats@gcc.gnu.org Subject: Re: libstdc++/9756: __verbose_terminate_handler enters infinite loop Date: Thu, 20 Feb 2003 11:25:08 -0500 On Thu, Feb 20, 2003 at 11:01:23AM -0500, Stephen M. Webb wrote: > 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)? Possibly, yes. > When I compile with gcc 3.2, I get expected behaviour: The sources have changed since then; in 3.2 we simply died. Now the verbose termination routine is on by default. > .... > #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 () Hmmmm. The verbose terminate handler re-throws the exception in order to try and give the user more help: // If the exception is derived from std::exception, we can give more // information. try { __throw_exception_again; } #ifdef __EXCEPTIONS catch (exception &exc) { char const *w = exc.what(); writestr(" what(): "); writestr(w); writestr("\n"); } #endif catch (...) { } The rethrow never... eh, I don't know how to express this clearly. The rethrow never rethrows; it never leaves the try block. Instead, the support routine __cxa_rethrow calles std::terminate, and there's the infinite loop. I have no idea why; the core dump I get (and the rest of us got during testing) shows this: #0 0x40124a51 in kill () from /lib/libc.so.6 #1 0x40124872 in raise () from /lib/libc.so.6 #2 0x40125986 in abort () from /lib/libc.so.6 #3 0x400a1fcb in __gnu_cxx::__verbose_terminate_handler() () at /home/pme/src/unified/libstdc++-v3/libsupc++/vterminate.cc:96 The same thing up until the rethrow; it's supposed to finish the rethrow, hit the "catch (...) { }" line, and then abort() a few lines later (line 96). Phil -- I would therefore like to posit that computing's central challenge, viz. "How not to make a mess of it," has /not/ been met. - Edsger Dijkstra, 1930-2002
next reply other threads:[~2003-02-20 16:26 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-02-20 16:26 Phil Edwards [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-02-28 21:06 Stephen M. Webb 2003-02-28 19:11 bkoz 2003-02-20 19:36 Stephen M. Webb 2003-02-20 17:06 Stephen M. Webb 2003-02-20 17:06 Phil Edwards 2003-02-20 16:06 Stephen M. Webb 2003-02-19 22:06 Phil Edwards 2003-02-19 16:06 stephenw
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20030220162600.22557.qmail@sources.redhat.com \ --to=phil@jaj.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).