MSC Danger (was Re: Turbo C vs Quick C)
Timothy L. Kay
tim at cit-vax.Caltech.Edu
Mon Feb 15 06:50:49 AEST 1988
In article <2946 at dasys1.UUCP> wfp at dasys1.UUCP (William Phillips) writes:
>In article <567 at naucse.UUCP>, wew at naucse.UUCP (Bill Wilson) writes:
>> Turbo C is superior to Quick C. On our campus here we have also
>> had Quick C blow away hard drives, so be careful.
>
>I know of a case where MSC (4.0 I think) utterly scrambled a hard drive
>(not backed up, natch), when a module compiled with one memory model was
>linked with modules compiled with a different model. I've forgotten the
This can happen with *any* C compiler that uses the large model. Once
you allow the compiler to generate code that messes with the segment
registers, you open yourself up for much more destructive bugs. If you
break the rules and link large model with small model, who knows what
is going to happen? Suppose the result is that your bug scribbles all
over low memory, exactly where some sectors from the FAT happens to
be. Then the program bombs. Your next disk write will scribble in
random places on the disk because the in-core copy of the FAT sectors
has been clobbered.
The only solution is to stick to small models or get some memory protection
ala Unix/386.
Tim
More information about the Comp.lang.c
mailing list