[comp.lang.c] MSC compiler stack overflow

lotto@wjh12.HARVARD.EDU (Jerry Lotto) (06/18/87)

In article <4283@ihlpa.ATT.COM> vkar@ihlpa.ATT.COM (Thayalan) writes:
>I have the Micro-Soft C compiler version 4.0. And I am
>trying to compile a program with lots of strings.
>The compiler is running out of stack space ( please note:
>its not my program but the compiler "msc.exe" that's having
>the problem). 
>When msc.exe is started the value of SP=0080h, which tells
>me that 80h bytes are allocated for stack. I also checked
>the msc.exe from version 3.0 and it has a stack space of
>800h. This program compiles without any problem with the
>version 3.0 compiler.

Look at the program EXEMOD distributed with your compiler.  One of
it's (few) functions is to modify the .EXE header initial stack
pointer. Use this on MSC.EXE (or whatever, see caveat below) to
allocate more stack space on startup.

An aside: Check out what image is actually giving you the problem. I
ran into this with a previous version of uSoft C and was confused by
the fact that I was using the CL front end. Someone finally posted a
switch that got CL to echo its args to each exec to the command line.
This switch was undocumented as has changed since I last tried it.
Anyway, it permitted me to see the command line overflow, as well as
the specific pass of the compiler that was running out of stack space.
The image that needed that patch was C2.EXE (I think) NOT CL.EXE.
MSC.EXE is also a front end to the specific pass images. It is
probably not MSC.EXE that is ginving you this problem.

PS - Does anyone know what this switch is under 4.0?
-- 
Gerald Lotto - Harvard Chemistry Dept.
UUCP:  {seismo,harpo,ihnp4,linus,allegra,ut-sally}!harvard!lotto
ARPA:  lotto@harvard.harvard.edu