]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
"Fix" makecontext() so that the C code begins execution with its
authorPeter Wemm <peter@FreeBSD.org>
Fri, 5 Dec 2003 01:36:44 +0000 (01:36 +0000)
committerPeter Wemm <peter@FreeBSD.org>
Fri, 5 Dec 2003 01:36:44 +0000 (01:36 +0000)
commit04cb6b3aa6b5510707e141f00c75103c16f16744
treeead4c3d249a6ae029feb046a2af69191e974848f
parent21cbd69b1968c6b231e919efe46d35068e0b2161
"Fix" makecontext() so that the C code begins execution with its
ABI-required stack alignment.  C code expects that the push of the
return address disturbed the 16 byte alignment and it will take corrective
measures to fix it before making another call.  Of course, if its wrong
to start with, then all hell breaks loose.  Essentially we "fix" this
by making the stack alignment odd to start with.

This was one of the things that broke on libkse with apps that use
floating point/varargs/etc.

Approved by:  re (scottl)
lib/libc/amd64/gen/makecontext.c