🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: MS C Compiler bug

#7880
From: W. Paul Mills
Date: Wed, 08 Nov 1995 14:42
38 lines
1597 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).

This is not a bug!

You need to increase the size of your stack. A command line option
will do that for you.

You could also declare your array outside of main, which would
take less stack space.

-- 
| ------------------ |  New LINUX Hacker | My only love is my |
| wpmills@tyrell.net |-------------------| computer. No other |
| -----------------  |    Old C Hacker   |    is worth it!    |
Technical Details
Message-ID: <wpmills.815841731@wpmills>
Path: arc1-ca.pugleaf.net!news.tyrell.net!wpmills!wpmills
References: <47oaiq$b02@cnn.Princeton.EDU>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer,comp.lang.c
Path: arc1-ca.pugleaf.net!news.tyrell.net!wpmills!wpmills
From: wpmills@wpmills (W. Paul Mills)
Subject: Re: MS C Compiler bug
X-Nntp-Posting-Host: ttyrc.tyrell.net
Message-ID: <wpmills.815841731@wpmills>
Sender: news@tyrell.net (*)
Organization: Tyrell Corporation - 800-TYRELL-1 - POP's in 504/816/913/316
References: <47oaiq$b02@cnn.Princeton.EDU>
Date: Wed, 8 Nov 1995 14:42:11 GMT