other/7620: gij doesn't work properly on SH port.
kkojima@gcc.gnu.org
kkojima@gcc.gnu.org
Sat Aug 17 01:37:00 GMT 2002
>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:
More information about the Gcc-prs
mailing list