MSC Danger (was Re: Turbo C vs Quick C)

Dave Levenson dave at westmark.UUCP
Sun Feb 21 10:45:09 AEST 1988


In article <443 at siemens.UUCP>, jrv at siemens.UUCP (James R Vallino) writes:

> ...So if you want to blame a compiler then
> blame ALL the C compilers for not providing an option to check for use of
> NULL pointers at runtime. (The MSC V5.0 compiler is the first C compiler I
> have ever worked with which does have this option.)

MS-C release 3.0 and 4.0 also check for NULL pointer references at
runtime.  They do this by loading a 16-byte constant (actually,
their copyright notice) into the first sixteen bytes of the data
segment.  This is checked against another copy before and after the
execution of your program.  If they don't compare, the runtime
package displays the nessage "NULL POINTER REFERENCE" as your
program exits.  If you also managed to munge the operating system,
however, this check probably won't save you!
-- 
Dave Levenson
Westmark, Inc.		A node for news.
Warren, NJ USA
{rutgers | clyde | mtune | ihnp4}!westmark!dave



More information about the Comp.lang.c mailing list