Hi, I have compiled the test program also with msvc for the ebox4300 device. It seems msvc has the same behavior, the stack66000 fails.
It is strange why some of our tests do fail with gcc and not with msvc due to the stack issue. Seems we can't resolve this with cegcc, it is something in windows ce Johnny > I've been poking in the stack limit problem that Johnny reported. > > Test program attached, it can be used with e.g. > i386-mingw32ce-gcc -DSTACK_SIZE=6000 -o stack6000.exe stack.c > i386-mingw32ce-gcc -DSTACK_SIZE=66000 -o stack66000.exe stack.c > > The stack6000 execution succeeds and leaves the expected contents in > out.txt : > In main > Size : 6000 > After memset > The stack66000 execution creates a dialog on the screen saying > Application Error > Application stack66000.EXE encountered a serious error and must > shut > down > It also adds one line to out.txt : > In main > > I've built a linux gcc 4.4.0, as expected the same application has no > problems on linux. > > A difference between the assembly code generated for the two platforms > (see attached source files) is that the CE version calls a function > __chkstk to probe the stack (see gcc/config/i386/cygwin.asm), the linux > version does not. > > large: (Linux) > pushl %ebp > movl %esp, %ebp > subl $66024, %esp > movl $.LC0, %eax > movl $66000, 8(%esp) > movl %eax, 4(%esp) > movl $outbuf, (%esp) > call sprintf > movl $outbuf, (%esp) > call Print > > > _large: (CE) > pushl %ebp > movl %esp, %ebp > movl $66024, %eax > call ___chkstk > movl $66000, 8(%esp) > movl $LC0, 4(%esp) > movl $_outbuf, (%esp) > call _sprintf > movl $_outbuf, (%esp) > call _Print > > I've tried porting the piece of Linux assembler in the CE code. This > requires adding an underscore at some lines, removing dots at others. > The end result is the same though : crash. > > Help ! :-( > > Danny > -- > Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel