Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Sep 1997 20:02:33 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        nsmart@iona.com (Niall Smart)
Cc:        tlambert@primenet.com, Don.Lewis@tsc.tdk.com, hackers@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG
Subject:   Re: Bug in malloc/free
Message-ID:  <199709192002.NAA29627@usr03.primenet.com>
In-Reply-To: <Pine.SOL.3.96.970919175745.5952D-100000@ultra> from "Niall Smart" at Sep 19, 97 05:58:18 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > > } We claim to be sort of POSIX conformant.  Perhaps this is enough.  We
> > > } aren't actually POSIX conformant.  All the above "safe" routines may
> > > } clobber the global `errno'.
> > > 
> > > Which is why I save and restore errno in signal handlers.
> > 
> > Perhaps this should be done by the trampoline code on the user's
> > behalf...
> 
> Perhaps that would encourage people to write non-portable code.

When a read or write fault occurs on page zero in a program running
on SVR4, rather than crashing, the map the page and note the effect.

There is a kernel tunable that can turn this off, but a great many
legacy programs dereference NULL pointers, expecting a NULL pointer
to be identical to a NULL string.

The default for SVR4 is arguably incorrect, but it follows the principle
of least astonishment, and allows legacy code to run.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709192002.NAA29627>