[comp.sys.ibm.pc.misc] Control-c problems with Borland C

dhancock@aerospace.aero.org (Don C. Hancock) (06/05/91)

Control-C locks up Borland C but not Turbo C.

I'm having a difficult problem with the Borland C compiler.
In a current project I find that often (but not always) the
first time I run after linking I get either the "Abnormal 
program termination" message or it just locks up, requiring 
a hard reboot.  After re-booting, it works fine.  I was
able to reproduce some of the problems with the following
very short program, really nothing more than a delay
to allow me to hit control C:

#include <stdio.h>
#include <math.h>

main()
{
	double x=0;
	int i;

	for(i=0; i<32767; i++)
		x=x*x*x*x*x*x*x; /* delay */
}

I then compiled/linked the program using turbo C version 2.00 (tlink 2.0)
and with Borland C version 2.00 (tlink 4.0), creating TCERR.EXE and BCERR.EXE.

If I break either TCERR or BCERR with ctl-c, the next time
I run BCERR, it locks up the machine.  TCERR always works. Also, 
the following sequence ALWAYS produces the 
"Abnormal program termination" message and requires a reboot.

1) compile/link using Turbo C ==>TCERR.EXE
2) execute TCERR and break with ctl-c
3) compile/link BCERR.EXE using Borland C
4) execute BCERR

I'm using an AST premium 386/25 with dos 3.3.  Any help you
could give me would be greatly appreciated.  Email please. Thanks.

	Don Hancock
	dhancock@aerospace.aero.org