delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/12/03/15:42:56

From: dahms AT ifk20 DOT mach DOT uni-karlsruhe DOT de
Subject: RE: serious bug with CYGNUS GCC b16
3 Dec 1996 15:42:56 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <009AC4FC.C37EA2A0.5525.cygnus.gnu-win32@ifk20.mach.uni-karlsruhe.de>
Original-To: pascal DOT obry AT der DOT edfgdf DOT fr
Original-CC: gnu-win32 AT cygnus DOT com, dahms AT ifk20 DOT mach DOT uni-karlsruhe DOT de
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Hi Pascal, you wrote:

: #define ARRAY_SIZE 2038010
: 
: int
: main (void)
: {
:   char A [ARRAY_SIZE];
: }

: (bug.exe 1000) exception is: STATUS_STACK_OVERFLOW

The problem is not b16, but that automatic arrays are allocated on the stack.
If you make it static or use malloc/calloc, it should work.

I don't know how to increase the stack limit under Win*, but I do know
that on several unix systems the maximum stack limit is much smaller than
what you can alloc!


Bye, Heribert (dahms AT ifk20 DOT mach DOT uni-karlsruhe DOT de)
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019