What machines core dump on deref of NULL?

Chip Salzenberg chip at tct.uucp
Wed Jun 27 01:45:59 AEST 1990


According to rlc at aix.aix.kingston.ibm.com (Roger Collins):
>When a commercial computer system doesn't run a piece of software (no
>matter how old or poorly written) that runs on other systems, the
>computer gets the blame.

"The computer" often gets the blame undeservedly.

So what?

We should NOT make engineering decisions based on
perceived blame.  Dereferencing null pointers is
*illegal* and *non-portable*.

>Now, why don't you suggest to your boss that you release a computer
>that initializes .bss to 0xffffffff? (Leaving it uninitialized is a
>security hole on multiuser systems.)  It doesn't break the C language.

Yes it would.  Uninitialized globals *are* guaranteed
to be zero (or null, for pointers).  Perhaps you
should read Kernighan and Ritchie's book.  It is a
good idea to learn a language before trying to use it
as example of anything.  Otherwise you could end up
looking stupid.
-- 
Chip Salzenberg at ComDev/TCT     <chip at tct.uucp>, <uunet!ateng!tct!chip>



More information about the Comp.unix.wizards mailing list