*BSD News Article 44991


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!news.mathworks.com!gatech!swrinde!cs.utexas.edu!venus.sun.com!nntp-hub2.barrnet.net!nntp-sc.barrnet.net!netapp.com!netapp.com!not-for-mail
From: guy@netapp.com (Guy Harris)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Major strcmp bug under BSD 2.0?
Date: 5 Jun 1995 15:47:04 -0700
Organization: Network Appliance Corporation
Lines: 22
Message-ID: <3r01h8$lp7@nova.netapp.com>
References: <3qfn52$188j@troy.la.locus.com> <3qo3m8$aq7@park.uvsc.edu> <3qqm6i$d5m@cynjut.neonramp.com>
NNTP-Posting-Host: 192.9.200.13

In article <3qo3m8$aq7@park.uvsc.edu>,
Terry Lambert  <terry@cs.weber.edu> wrote:
>This is a result of the intentional unmapping of page 0 to catch
>NULL pointer dereferences with a kernel "page not present" error.
>
>SunOS and Solaris do the same thing.

Dave Burgess <burgess@cynjut.neonramp.com> wrote:
>Not to beat a dead horse unnecessarily, but didn't WE used to do the
>same thing?

"The same thing", in the above, is *UN*mapping page 0, so that attempts
to dereference NULL pointers get SIGSEGV - *NOT* mapping page 0 such
that programs that attempt to dereference NULL pointers don't get
SIGSEGV - which indicates that:

>Remember all of the programs that used to work before NetBSD and FreeBSD
>unmapped page 0????

if "WE" means "{Net,Free}BSD", then "WE" used *NOT* to do the same
thing, and now *DO* the same thing, i.e. (quite properly) punish
programs that don't check for NULL pointers.