[comp.sys.ibm.pc] MSC 5.0 stack checking.

herve@titn.TITN (Herve Siegrist) (12/17/87)

I'm having a little bit of trouble with Microsoft C version 5.0. I need
to create a program which does not perform any stack checking, as it does
not use the C stack most of the time. With stack checking enabled, I quickly
get stack overflow errors, and that's it. As this program is running in the
background, it causes quite a mess...

With Microsoft 4.0, I just had to create a __chkstk routine in assembly which
was not checking anything, link with this routine, compile everything else 
with the Gs option, and that was it...  Everything was fine, the linker did 
not complain...

With 5.0 however:

	- Something still check the stack and causes the program to crash
	  it I suppress __chkstk module in my assembly code (normal: I use
	  sprintf's which do stack checking, according to MSC...).

	- With my __chkstk installed, the linker gives me an error saying
	  that __chkstk is multiply defined, and tells me to use the /NOE
	  option.

	- With my __chkstk installed, and with the /NOE option, I still get
	  the same error, but the linker does not suggest /NOE anymore. How
	  nice...

One last thing finally: Even with the linker error, the program works great, 
but I'd really would like to get rid of the error... It would be so simple
if Microsoft could simply have disabled the stack checking in their libraries
if the linked code had been compiled with -Gs (how about a linker option?)...

Would anybody have some ideas about this stack checking problem? I would hate
to have to build a new library as I still need the old one for 'regular' code
and as I do not have much space left on my disk for one more of these <<HUGE>>
5.0 libraries.

Thanks,

----- If this signature is here twice, that's not my fault -----
=========================================================================
Herve Siegrist, TITN Inc.  24301 Southland Dr. Suite 200, Hayward, CA 94545
(415) 785-5970	UUCP:	(decvax|ucbvax|ihnp4)!decwrl!sun!plx!titn!herve
=========================================================================
-- 
=========================================================================
Herve Siegrist, TITN Inc.  24301 Southland Dr. Suite 200, Hayward, CA 94545
(415) 785-5970	UUCP:	(decvax|ucbvax|ihnp4)!decwrl!sun!plx!titn!herve
=========================================================================