Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!uwvax!husc6!bu-cs!bzs From: bzs@bu-cs.BU.EDU (Barry Shein) Newsgroups: net.lang.c Subject: Re: ANSI C (re: null pointers) Message-ID: <1096@bu-cs.bu-cs.BU.EDU> Date: Fri, 22-Aug-86 12:24:49 EDT Article-I.D.: bu-cs.1096 Posted: Fri Aug 22 12:24:49 1986 Date-Received: Fri, 22-Aug-86 21:55:29 EDT Organization: Boston U. Comp. Sci. Lines: 25 An amusing anecdote on NULL pointers: On our large IBM system an early version of one of the screen editors had a null pointer problem. Basically, it would load the contents of address 0 into a register rather than a zero. Of course, the contents of location zero was zero. Usually. Address zero on an IBM is the Machine Check PSW double-word. This will contain the PSW if a machine check recently occurred (PSW is the combined processor status, program counter, machine check means a detected hardware error, obviously not fatal or why put it there.) You guessed it! Mysterious failures of the editor as address 0 contained non-zero values for fleeting microseconds after a machine check, which was a rare event. I guess the area got re-zeroed after the O/S logged the error (or whatever.) It handled the machine check asynchronously (maybe this was really caused by the dual processors, I don't remember.) Fun fun. Kids, our lives were already ruined by this sort of self-abuse, but you're young, you can be saved, ah youth, wasted on the young :-) -Barry Shein, Boston University