Bug 77440 - g++ does not do exception handling.
g++ does not do exception handling.
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
8.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-11-06 21:42 EST by simra
Modified: 2007-04-18 12:48 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-11-06 21:42:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description simra 2002-11-06 21:42:15 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

Description of problem:
g++ exception handling is not functional-- catch blocks are completely ignored.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Compile the following program:

g++ -o foo foo.cc 
or
g++ -fexceptions -o foo foo.cc
foo.cc:
#include <iostream>
#include <exception>
using namespace std;
int main(int argc, char ** argv) {
        try {
                throw exception();
        }
        catch (...) {
                cerr<<"Caught!!";
                exit(0);
        }
}


2. Run foo.

	

Actual Results:  Program aborts with the message "Abort".

Expected Results:  Program should exit() with message "Caught!!" 

Additional info:

simra@water:[simra] 55>g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
simra@water:[simra] 56>rpm -q gcc
gcc-3.2-7
Comment 1 simra 2002-11-06 21:53:13 EST
Oops. My bad.. at run time the dynamic linker was using a locally built
libstdc++ from gcc 3.1.

Note You need to log in before you can comment on or make changes to this bug.