From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2158 invoked by alias); 17 Aug 2002 01:16:03 -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 2121 invoked by uid 71); 17 Aug 2002 01:16:01 -0000 Resent-Date: 17 Aug 2002 01:16:01 -0000 Resent-Message-ID: <20020817011601.2119.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, kkojima@gcc.gnu.org Received: (qmail 306 invoked by uid 61); 17 Aug 2002 01:13:14 -0000 Message-Id: <20020817011314.305.qmail@sources.redhat.com> Date: Sat, 17 Aug 2002 01:37:00 -0000 From: kkojima@gcc.gnu.org Reply-To: kkojima@gcc.gnu.org To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: other/7620: gij doesn't work properly on SH port. X-SW-Source: 2002-08/txt/msg00348.txt.bz2 List-Id: >Number: 7620 >Category: other >Synopsis: gij doesn't work properly on SH port. >Confidential: no >Severity: critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Aug 16 18:16:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: kkojima@gcc.gnu.org >Release: 3.3 20020808 (experimental) >Organization: >Environment: host: sh4-unknown-linux-gnu build: sh4-unknown-linux-gnu target: sh4-unknown-linux-gnu >Description: Automatic variable sized array is clobbered when the sjlj exception is threw. Compiler generates the code which _Unwind_SjLj_Register is called before allocating stack for a variable sized array which is automatic variable. So the stack pointer is set higher than such arrays when the exception threw, and the contents of these arrays are clobbered. >How-To-Repeat: Compile the following source with cc1plus for sh4-unknown-linux-gnu target configured with --enable-sjlj-exceptions and look its output. -- aa.cc -- void foo (int); void bar (int *) throw (int); int a; void f (int max_stack) { int aa[max_stack]; int *sp = aa; try { bar (aa); return; } catch (int e) { foo (e); a = *sp; } } >Fix: >Release-Note: >Audit-Trail: >Unformatted: