From owner-freebsd-bugs Fri Sep 19 13:04:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id NAA04372 for bugs-outgoing; Fri, 19 Sep 1997 13:03:19 -0700 (PDT) Received: from usr03.primenet.com (tlambert@usr03.primenet.com [206.165.6.203]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id NAA04342; Fri, 19 Sep 1997 13:03:12 -0700 (PDT) Received: (from tlambert@localhost) by usr03.primenet.com (8.8.5/8.8.5) id NAA29627; Fri, 19 Sep 1997 13:02:33 -0700 (MST) From: Terry Lambert Message-Id: <199709192002.NAA29627@usr03.primenet.com> Subject: Re: Bug in malloc/free To: nsmart@iona.com (Niall Smart) Date: Fri, 19 Sep 1997 20:02:33 +0000 (GMT) Cc: tlambert@primenet.com, Don.Lewis@tsc.tdk.com, hackers@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG In-Reply-To: from "Niall Smart" at Sep 19, 97 05:58:18 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > > } 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.