public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: coderman@mindspring.com
To: gcc-gnats@gcc.gnu.org
Subject: c++/3244: Exception handling fails in 2.95.2 and 2.95.3 in various ways
Date: Mon, 18 Jun 2001 21:26:00 -0000	[thread overview]
Message-ID: <20010619042226.7314.qmail@sourceware.cygnus.com> (raw)

>Number:         3244
>Category:       c++
>Synopsis:       Exception handling fails in 2.95.2 and 2.95.3 in various ways
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 18 21:26:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     coderman@mindspring.com - Martin Peck
>Release:        g++ 2.95.2 and 2.95.3
>Organization:
>Environment:
Various Linux environments using various stdc++ libraries associated with the 2.95.2 and 2.95.3 releases.  This is the intel platform.
>Description:
When building a large application using many shared libraries and many classes I encounter problem with exception handling.

In 2.95.2 the application Aborts, behaving as if an exception was raised that did not match the specification of the method that raised it.  In this case the method had no specification at all, which means it should allow any exception to be raised.  When I added a specification for this method, the problem went away.

Using 2.95.3 the application enters the method that raises the exception.  When the exception is raised, the thread spins to 100% CPU and never returns.  Even modifying the exception specification had no effect.

I rebuilt the application using 2.95.3 and used ALL static libraries, making a single stand alone binary (no shared libs like prior attempts).  In this case the application seg faulted once the exception was raised.

Tracing the result in GDB I found that the application was using an exception specification for a COMPLETELY DIFFERENT METHOD! in an entirely separate library.  Some how the exception specification lookup had failed, and the wrong specification was used.  This caused a seg fault.

I am guessing that there is some kind of hash lookup based on fully qualified method name to locate exception specifications.  It appears that perhaps this lookup is not handling collision correctly, and the wrong specification may be used under the right (very improbable) situations.

I have never been able to repeat this error without bulding the entire application.  All subsets fail to show this behavior.  Again, I am assuming that this is due to some kind of symbol collision, which only manifests itself in large applications with lots of shared libraries and classes.
>How-To-Repeat:
unknown.
>Fix:
unknown.
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2001-06-18 21:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-18 21:26 coderman [this message]
2001-12-15 11:41 nathan

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=20010619042226.7314.qmail@sourceware.cygnus.com \
    --to=coderman@mindspring.com \
    --cc=gcc-gnats@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: link
Be 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).