i386 stack missalignment on main

Joern Rennecke amylaar@redhat.com
Tue Jul 31 11:37:00 GMT 2001


> I didn't exactly follow this, but if you mean what I think you mean,
> this doesn't work for C++, sorry.  (Or maybe someone has fixed the
> basic problem, I might be out-of-date).

I mean a possibly overlapping binary copy of the named arguments.
On the x86, this could look something like this:

before move:        after move:


unnamed arguments   unnamed arguments


------------------  -----------------
                    padding

named arguments     -----------------

                    named arguemnts
------------------
return address
saved stack ptr     -----------------
                    return address
                    saved stack ptr


Is that a problem with C++ ?  If so, why?



More information about the Gcc-patches mailing list