Xref: utzoo comp.lang.c:7360 comp.sys.ibm.pc:12041 Path: utzoo!utgpu!water!watmath!clyde!burl!codas!mtune!westmark!dave From: dave@westmark.UUCP (Dave Levenson) Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: MSC Danger (was Re: Turbo C vs Quick C) Keywords: good better best Message-ID: <112@westmark.UUCP> Date: 21 Feb 88 00:45:09 GMT References: <389@lscvax.UUCP> <567@naucse.UUCP> <2946@dasys1.UUCP> <443@siemens.UUCP> Organization: Westmark, Inc., Warren, NJ, USA Lines: 20 In article <443@siemens.UUCP>, jrv@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