From: utzoo!decvax!decwrl!sun!megatest!fortune!hpda!hplabs!hao!seismo!rocheste!ritcv!mjl Newsgroups: net.unix-wizards Title: Re: Questions about nil-pointer dereferences (the "plague") Article-I.D.: ritcv.255 Posted: Tue Apr 5 09:42:42 1983 Received: Thu Apr 7 04:14:59 1983 References: watcgl.300 The C compiler on V7 had (has?) an interesting problem due to referencing thru a NIL pointer. Somewhere in the parsing routines there is a check of a bit in a structure that maintains parser state information. Under some weird condi- tions that I can't remember exactly (I saw this over 2 years ago) a NIL pointer gets passed to the checking routine. As it so happens, the bit being checked is in the correct state because of the particular instructions in crt0.o. However, we changed the runtime startoff routines, the bit changed, and a syntax error was generated where none in fact existed. Needless to say, this was an EXTREMELY hard bug to find (and correct). In fact, we considered relinking the compiler as a separate I+D program with the standard runtime startoff in data space just to get around this problem (desperation can lead you to do strange things). Mike Lutz (ucbvax!allegra!rochester!ritcv!mjl)