This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/38245] [4.4 Regression] stack corruption when a call is removed but not the outgoing argument pushes



------- Comment #18 from jakub at gcc dot gnu dot org  2008-12-19 14:37 -------
Created an attachment (id=16944)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16944&action=view)
gcc44-pr38245.patch

On x86_64 some more work is needed, because in leaf functions parts of the
outgoing_args_size space might be in red-zone, and as all the left-over stack
pushes are from %rsp upwards, that still clobbers the return pointer.
Perhaps we might in that case just make the red-zone smaller to make sure all
of the outgoing_args_size are is above the red zone.

This patch also fixes powerpc64, though in that case (or for msabi on x86_64
too) if we eliminate a call that has arguments solely in registers, still
outgoing_args_size area is allocated.

I guess we might want to track the size of outgoing args we really pushed for
some call, not considering OUTGOING_REG_PARM_STACK_SPACE, and remember it in a
new crtl-> field.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38245


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]