delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/05/13/05:58:11

From: rich AT adoc DOT xerox DOT com (Rich Hyde)
Subject: Re: strlen on a NULL
13 May 1998 05:58:11 -0700 :
Message-ID: <199805121625.JAA24637.cygnus.gnu-win32@cardoon.adoc.xerox.com>
References: <3557E6C4 DOT EF2F27B3 AT kiwiplan DOT co DOT nz>
Mime-Version: 1.0
To: Ian Collins <ian AT kiwiplan DOT co DOT nz>
Cc: gnuwin32 <gnu-win32 AT cygnus DOT com>

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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019