[comp.sys.ibm.pc] Stack overflow in MSC V3.0

murphys@cod.UUCP (Steven P. Murphy) (06/10/87)

	I am having troubles with C,  MSC V3.0 to be exact.

	I have written a program on a pc to do some matrix operations and I had been using LINT on a main frame to help debug it.  The problem is it compiles on the main frame with % cc filename -lm and runs, but on the pc I use:

		    > msc /AL /FPi  filename
		    > link /STACK:65000  filename

and all I get is stack overflow.  Any help with what I'm doing wrong would be greatly appreciated.


Thank in advance.       
					  Murph,

mac@idacrd.UUCP (Bob McGwier) (06/10/87)

> 	I am having troubles with C,  MSC V3.0 to be exact.
> 
> 	I have written a program on a pc to do some matrix operations and I had been using LINT on a main frame to help debug it.  The problem is it compiles on the main frame with % cc filename -lm and runs, but on the pc I use:
> 
> 		    > msc /AL /FPi  filename
> 		    > link /STACK:65000  filename
> 
> and all I get is stack overflow.  Any help with what I'm doing wrong would be greatly appreciated.
> 
> 
> 					  Murph,

Check to see how much stack is available before each subroutine with a
call to stackavail()  (sp?).  It's in my msc 4.0 library and it may be
in
yours.

This should help you track down the offending routine.

Bob
.

kneller@cgl.ucsf.edu (Don Kneller%Langridge) (06/11/87)

>> 	I am having troubles with C,  MSC V3.0 to be exact.
>> 	On the pc I use:
>> 
>> 		    > msc /AL /FPi  filename
>> 		    > link /STACK:65000  filename
>> all I get is stack overflow

One question.  Are you using the stack for large temporary matrices?
It doesn't take a very large matrix of doubles to completely utilize
all of stack space (maximum of (64k/8) elements == 8k elements).  For
a two dimensional array, this is less than a single 90 by 90 array.
-----
	Don Kneller
UUCP:	...ucbvax!ucsfcgl!kneller
ARPA:	kneller@cgl.ucsf.edu
BITNET:	kneller@ucsfcgl.BITNET