[Bug rtl-optimization/38245] [4.4 Regression] stack corruption when a call is removed but not the outgoing argument pushes
ebotcazou at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Dec 11 23:05:00 GMT 2008
------- Comment #11 from ebotcazou at gcc dot gnu dot org 2008-12-11 23:03 -------
> I guess for !ACCUMULATE_OUTGOING_ARGS DCE of calls having stack arguments
> generally shouldn't be an issue (unless they pop the stack themselves, don't
> remember if it is easily determinable in generic way), worst case where will
> be some pushes and some pops or stack additions left around.
> For ACCUMULATE_OUTGOING_ARGS you could use:
> (expr_list:REG_DEP_TRUE (use (mem:SI (reg/f:SI 7 sp) [0 S4 A8]))
> (expr_list:REG_DEP_TRUE (use (mem:SI (plus:SI (reg/f:SI 7 sp)
> (const_int 4 [0x4])) [0 S4 A8]))
> (nil))))
> from the CALL_INSN, just see if you can find safely and remove also the
> stores to those stack locations, if yes, remove them together with the
> call, if not, don't DCE the call either.
This seems reasonable to me.
Because of more urgent issues suddenly popping up in a row, I haven't had time
to seriously work on this and probably won't have before next year. Sorry.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|ebotcazou at gcc dot gnu dot|unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38245
More information about the Gcc-bugs
mailing list