Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 77440

Summary: g++ does not do exception handling.
Product: [Retired] Red Hat Linux Reporter: simra
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 8.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-11-07 02:42:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description simra 2002-11-07 02:42:15 UTC
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-07 02:53:13 UTC
Oops. My bad.. at run time the dynamic linker was using a locally built
libstdc++ from gcc 3.1.