c++/3723: run-time SIGSEV with exception - sparc - optimized

amaury@ethernix.com amaury@ethernix.com
Tue Jul 17 17:46:00 GMT 2001


>Number:         3723
>Category:       c++
>Synopsis:       run-time SIGSEV with exception - sparc - optimized
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 17 17:46:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     amaury@ethernix.org
>Release:        gcc-3.0
>Organization:
>Environment:
Configured with: ../gcc-3.0/configure --prefix=/home/gcc/gcc-3.0-sparc-install
Thread model: posix
gcc version 3.0
>Description:
The following example crashes when the exception is thrown.
Everything is fine in debug mode.


class Object {
public:
           Object (void);
  virtual ~Object (void);
};

// create a new object
Object::Object (void) {
}

// destroy this object
Object::~Object (void) {
}

// this function throw the object
static void lance (void) {
  throw Object ();
}

int main (int, char**) {
  // try to catch the object
  try {
    lance ();
  } catch (...) {
    return 0;
  }
  return 1;
}
>How-To-Repeat:
g++ -Wall -O2 -o bug bug.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-prs mailing list