Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Sep 1997 08:05:54 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        Niall Smart <nsmart@iona.com>, Don.Lewis@tsc.tdk.com, hackers@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG
Subject:   Re: Bug in malloc/free
Message-ID:  <19970920080554.38866@lemis.com>
In-Reply-To: <199709192002.NAA29627@usr03.primenet.com>; from Terry Lambert on Fri, Sep 19, 1997 at 08:02:33PM %2B0000
References:  <Pine.SOL.3.96.970919175745.5952D-100000@ultra> <199709192002.NAA29627@usr03.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 19, 1997 at 08:02:33PM +0000, Terry Lambert wrote:
>>>> } 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.

It's not just incorrect, it's inconsistent.  Some SVR4 do, some SVR4
don't.

True SRV4 story (I'll omit the name of the vendor to protect the
guilty): they had some problems with a runaway csh which went crazy
after the stdin line dropped, and ultimately it killed the system.
They determined that, for some reason, csh wasn't responding to
SIGHUP.  So they introduced a kernel mod to send a SIGKILL after 100
SIGHUPs.

Greg



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