This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 4/6]: Ping: Merge from Stack Branch - i386 backend changes
On Fri, May 9, 2008 at 12:33 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>>
>> Unfortunately, this doesn't work with C++ EH. Jan, does callgraph
>> collect incoming
>> stack alignment for exception? If not, we have to use PREFERRED_STACK_BOUNDARY
>> if there is exception.
>
> You mean EH in non-call exception? Throw calls should be safe, since
> they will cause PREFERRED_STACK_BOUNDARY to be bumped up.
> With non-call exception we might have probably have bug in mainline
> here.
>
A simple testcase is
---
#pragma implementation
#pragma interface
class Foo
{
public:
char * interp_frame;
char * frame;
};
class _Jv_Frame
{
public:
Foo *thread;
_Jv_Frame *next;
~_Jv_Frame ()
{
thread->frame = (char *) next;
}
};
class _Jv_InterpFrame : public _Jv_Frame
{
public:
_Jv_InterpFrame *next_interp;
~_Jv_InterpFrame ()
{
thread->interp_frame = (char *) next_interp;
}
};
---
When it is compiled with -fPIC -fwrapv -fno-rtti -fnon-call-exceptions
-fdollars-in-identifiers -ffloat-store -fomit-frame-pointer
on Linux/ia32, finish_eh_generation will bump preferred_stack_boundary.
H.J.