James Tabor wrote:
Hartmut Birr wrote:
Hi, why do you change this file? Alloca.c isn't used and should be removed. If we have an alloca function somewhere in our source, it must be completely written in assembler because the stack layout and the using of ebp depends on the compilers optimisation.
- Hartmut
arty@svn.reactos.com wrote:
Commit for blight: fix stack alignment.
Updated files: trunk/reactos/lib/crtdll/stdlib/alloca.c
Rewrite it! Make lib/crtdll/stdlib/i386/alloca.s and powerpc/alloca.s. James
Hi,
I think it isn't possible to write the alloca function outside from compiler. The compiler may use esp instead of ebp to access local variables. In this case it isn't possible to manipulate esp. I remember same old problems from hal:
pushf cli ... popf
This sequence has crashed reactos on optimized builds, because there was accessed a local variable inside pushf/popf by using esp+offset.
- Hartmut