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
Ros-svn mailing list Ros-svn@reactos.com http://reactos.com:8080/mailman/listinfo/ros-svn
On Mon, 11 Apr 2005 19:32:08 +0200 Hartmut Birr hartmut.birr@gmx.de 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.
Sorry, blight asked me to commit it.
Hartmut Birr schrieb:
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.
I agree with you. This function should really be completely written in assembler - optimizing builds will probably create a buggy function when stack frames are omitted (for example). Anyway, there should be an i386 sub-folder where this implementation should be moved to.
Regards, Mark
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
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