From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29460 invoked by alias); 5 Feb 2003 19:46:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 29434 invoked by uid 71); 5 Feb 2003 19:46:01 -0000 Resent-Date: 5 Feb 2003 19:46:01 -0000 Resent-Message-ID: <20030205194601.29432.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, fwang@ca.ibm.com Received: (qmail 26354 invoked by uid 48); 5 Feb 2003 19:37:51 -0000 Message-Id: <20030205193751.26353.qmail@sources.redhat.com> Date: Wed, 05 Feb 2003 19:46:00 -0000 From: fwang@ca.ibm.com Reply-To: fwang@ca.ibm.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/9588: memory fault when user throws exception from terminate() X-SW-Source: 2003-02/txt/msg00270.txt.bz2 List-Id: >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 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: