Article View: comp.os.msdos.programmer
Article #7879Re: MS C Compiler bug
From: Bob Stout
Date: Wed, 08 Nov 1995 03:55
Date: Wed, 08 Nov 1995 03:55
37 lines
1854 bytes
1854 bytes
On 7 Nov 1995, Eric Prebys wrote:
> 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.
Of course it should cause problems! Your aaabbb is an auto array of
2*500*4 bytes (sizeof(float) = 4), or 4K. The default stack size for MSC
7 is 2K. Similarly, the solution is also in your docs - recompile it
using the /F xxxx option where xxxx is the stack size in hex. Since the
default is 2K and you want to add another 4K, you should start out trying
/F 1800.
-------------------------------------------------------------
MicroFirm: Down to the C in chips...
FidoNet 1:106/2000.6
Internet bobstout@neosoft.com
Home of SNIPPETS - Current release:
ftp.brokersys.com:/pub/snippets/snip9510.zip & snip9510.taz (.tar.Z)
juge.com:/c/file/c/snip9510.lzh
ftp.Coast.NET:/SimTel/msdos/c/snip9510.zip (& SimTel mirrors)
Technical Details
Message-ID:
<Pine.BSD.3.91.951107215036.5331B-100000@Starbase.NeoSoft.COM>Path:
arc1-ca.pugleaf.net!Starbase.NeoSoft.COM!bobstoutReferences:
<47oaiq$b02@cnn.Princeton.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!Starbase.NeoSoft.COM!bobstout From: Bob Stout <bobstout@neosoft.com> Newsgroups: comp.os.msdos.programmer,comp.lang.c Subject: Re: MS C Compiler bug Date: Tue, 7 Nov 1995 21:55:19 -0600 Organization: NeoSoft Internet Services +1 713 968 5800 Message-ID: <Pine.BSD.3.91.951107215036.5331B-100000@Starbase.NeoSoft.COM> References: <47oaiq$b02@cnn.Princeton.EDU> NNTP-Posting-Host: starbase.neosoft.com Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <47oaiq$b02@cnn.Princeton.EDU>