🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7882

Re: MS C Compiler bug

#7882
From: Vic Kulikauskas
Date: Fri, 10 Nov 1995 00:10
32 lines
1494 bytes
Eric Prebys <prebys@puhep1.princeton.edu> writes:

> We are compiling software on a 486 using the Microsoft C compiler,
> version 7.0.  The following program
>
> =========================================================
> int main(int, char **);
>
> int main(int argc, char **argv)
> {
> float aaabbb[2][500];
> exit(0);
> }
> ==========================================================
>
> compiles, but causes the error
>
> R6000 - stack overflow
>
> when run.  The problem goes away if the array is made smaller, but
> this array shouldn't cause any problems.  Does anyone have any 
> suggestions?  The problem is independent of which memory model
> I use or whether or not I try to initialize the array (or
> any other switch or operation I can think of).

Your array uses about 4K of stack.  What stack size have you allocated?  
The default value is 2K, or at least it is with MSC 6.0, so of course 
you would get a stack overflow unless you changed the default.  You can 
change the stack size by using the /F option to CL, or the /STACK option 
to LINK.

Vic
Technical Details
Message-ID: <951109.191029.2O2.rnr.w164w@mmalt.guild.org>
Path: arc1-ca.pugleaf.net!news.uunet.ca!netsurf!netxsys!beltrix!mmalt!vic
References: <47oaiq$b02@cnn.Princeton.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.uunet.ca!netsurf!netxsys!beltrix!mmalt!vic
From: vic@mmalt.guild.org (Vic Kulikauskas)
Newsgroups: comp.os.msdos.programmer,comp.lang.c
Subject: Re: MS C Compiler bug
Message-ID: <951109.191029.2O2.rnr.w164w@mmalt.guild.org>
Date: Thu, 9 Nov 1995 19:10:29 EST
References: <47oaiq$b02@cnn.Princeton.EDU>
Organization: home of Usenet addict and family
X-Newsreader: rnr v2.00