strlen on a NULL

Rich Hyde rich@adoc.xerox.com
Tue May 12 19:07:00 GMT 1998


On some of the original UNIX machines address 0 was mapped and pointed to the 
magic number at the start of the kernel object. 

It was common on these systems to find files in the filesystem with this 
string as a name.  This was true for most PDP11s.  On the VAX the location 
often contained a zero.  On the early SUN and some other platforms 
address zero was typically not a valid address, and they would core dump.  
Some of these platforms had hardware limitations that made mapping zero 
either hard or impossible.  So they maintained it was a software bug.   Others
were offended by the sloppiness and deliberately did not fix this.

It became a big enough problem that many UNIXes provided a 
kernel compilation flag to not map address zero if you wanted to make sure 
that the code you developed would work on other systems.

It started out as a bug, then some depended on it as a feature, then it became 
a bug again.  I stopped tracking this bug 12 or more years ago so I do not 
know if the mindless masses have decided that it is a bug or a feature again, 
as these things seem to change with the wind.

Rich

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list