bootstrap/3568: C++ exception handling error
bwh276@sinamail.com
bwh276@sinamail.com
Thu Jul 5 03:06:00 GMT 2001
>Number: 3568
>Category: bootstrap
>Synopsis: C++ exception handling error
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 05 03:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Mobile Era Corp.
>Release: 2.96-85
>Organization:
>Environment:
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)
>Description:
#include <iostream>
int main () {
try
{
throw "Allocation failure";
}
catch (char *str)
{
cout << "Exception: " << str << endl;
}
return 0;
}
this codes above will cause program Abort or Core Dump
in RedHat 7.1
But it work in RedHAT 6.2
>How-To-Repeat:
#include <iostream>
#include <exception>
int main () {
try
{
throw "Allocation failure";
}
catch (char *str)
{
cout << "Exception: " << str << endl;
}
return 0;
}
compile the code above ,then run it in the redhat linux 7.1
>Fix:
none
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list