This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/9588: memory fault when user throws exception from terminate()
- From: fwang at ca dot ibm dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 5 Feb 2003 19:37:51 -0000
- Subject: c++/9588: memory fault when user throws exception from terminate()
- Reply-to: fwang at ca dot ibm dot com
>Number: 9588
>Category: c++
>Synopsis: memory fault when user throws exception from terminate()
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 05 19:46:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Frank Wang
>Release: gcc version 3.2
>Organization:
>Environment:
--enable-languages=c,c++,f77
--prefix=/opt/cross --host=powerpc-suse-linux
--target=powerpc64-linux
--enable-threads=posix
--disable-nls
--enable-shared
--with-headers=/usr/src/packages/BUILD/cross-ppc64-gcc-3.2/include-ppc64-glibc-2.2.5
>Description:
If user threw exception from terminate(), abort() function should be called. We used following codes to test this feathre by using 64bit g++, but got memory fault at running time
>How-To-Repeat:
Sample Source File:
===================
//tmp.cpp
using namespace std;
#include <exception>
struct S {
int i;
S() {i=1;}
};
void eh_term(void)
{
S s;
throw s;
}
int main(void)
{
set_terminate (&eh_term);
try {
throw 'a';
}
catch (S) {
}
return 0;
}
Test Process:
=============
STEP1: compiling and linking
/opt/cross/bin/powerpc64-linux-g++ tmp.cpp
STEP2: run
a.out
Actual Output:
=============
rc = 139
Error msg
Memory fault
Expected Output:
===============
rc = 134
Error msg
Abort
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: