From owner-freebsd-current@FreeBSD.ORG Sun Dec 2 14:30:57 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18FCE16A418; Sun, 2 Dec 2007 14:30:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com (relay02.kiev.sovam.com [62.64.120.197]) by mx1.freebsd.org (Postfix) with ESMTP id A1B8213C44B; Sun, 2 Dec 2007 14:30:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.226] (helo=deviant.kiev.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1IypqN-000Ghe-P1; Sun, 02 Dec 2007 16:30:55 +0200 Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id lB2EUmfN094433; Sun, 2 Dec 2007 16:30:48 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id lB2EUm3c094432; Sun, 2 Dec 2007 16:30:48 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 2 Dec 2007 16:30:48 +0200 From: Kostik Belousov To: Carl Shapiro Message-ID: <20071202143048.GS83121@deviant.kiev.zoral.com.ua> References: <4dcb5abd0711290226u69105089ya10526519e5cc12d@mail.gmail.com> <20071129112824.GD83121@deviant.kiev.zoral.com.ua> <4dcb5abd0711292235k2bc2af86t45f7268d429c03ad@mail.gmail.com> <20071130152631.GJ83121@deviant.kiev.zoral.com.ua> <4dcb5abd0712012042m6e6cd00br3c9e72c97f047ee5@mail.gmail.com> <20071202054815.GQ83121@deviant.kiev.zoral.com.ua> <4dcb5abd0712020059m70a02a0dyf63ebdaafc2a0ead@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NHfequSh1hmJPP0s" Content-Disposition: inline In-Reply-To: <4dcb5abd0712020059m70a02a0dyf63ebdaafc2a0ead@mail.gmail.com> User-Agent: Mutt/1.4.2.3i X-Scanner-Signature: e5a023dad48cfed04c9aaaf8a25ccfed X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 1838 [Dec 01 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-current@freebsd.org, davidxu@freebsd.org Subject: Re: Serious compatibility breakage in -current. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Dec 2007 14:30:57 -0000 --NHfequSh1hmJPP0s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 02, 2007 at 12:59:15AM -0800, Carl Shapiro wrote: > On Dec 1, 2007 9:48 PM, Kostik Belousov wrote: > > Is this some new code ? I did tested it on CLUCL-19d compiled for > > RELENG_6. Also, the sigbus_handler() from lisp/FreeBSD-os.c rev 1.12 > > does not contain the check, it seems (that describes why it worked for > > me). >=20 > Okay, this clearly explains why we are seeing different things. The > si_code check was added in version 1.16. This postdates the release > of CMUCL your first patch was tested against. Incidentally, I added > that check to the SIGBUS handler and should have known that it does > not appear in a formal release. Sorry about that. >=20 > > Could you, please, describe what was tested in more details ? Did > > you run the CMUCL (and sbcl) with the patch ? If yes, could you, please, > > show the file(1) output on the bin/lisp and bin/sbcl binary ? >=20 > I have a small test program that maps a page with PROT_NONE and > generates a protection violation by writing a byte to it. The "mmap6" > executable was compiled on a FreeBSD 6.1 system. The "mmap7" > executable was compiled on my 7.0-BETA3 system with your patch > applied. Below is a transcript of these two programs being run on the > patched 7.0-BETA3 system. >=20 > freebsd7% file mmap6 > mmap6: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), > dynamically linked (uses shared libs), not stripped > freebsd7% ./mmap6 > __FreeBSD_version=3D601000 > signum=3D10,info->si_code=3D12,context=3D0xbfbfe9d0 > freebsd7% file ./mmap7 > ./mmap7: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), > for FreeBSD 7.0 (700055), dynamically linked (uses shared libs), > FreeBSD-style, not stripped > freebsd7% ./mmap7 > __FreeBSD_version=3D700055 > signum=3D11,info->si_code=3D2,context=3D0xbfbfe9e0 >=20 > The source code to this program is in a bug report I submitted a few > days ago and errantly filed under "misc". Please visit > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D118304 and page down to the > "How-To-Repeat" heading. >=20 > I have also recompiled CMUCL on a FreeBSD 7 system starting with a > FreeBSD 6 binary and everything seems to work. I believe the output > of my small test program provides sufficient proof that the interfaces > we rely on are working as expected. Yes, I have the similar program to. I asked somewhat different question. sbcl has the following code in the src/runtime/bsd-os.c: /* Memory fault signal on FreeBSD was changed from SIGBUS to * SIGSEGV. */ if (getosreldate() < 700004) sig_memory_fault =3D SIGBUS; else sig_memory_fault =3D SIGSEGV; It shall broke in the way similar to the CMUCL, after I commit the patch to CURRENT/RELENG_7, regardless of whether I MFC crtbrand.c fix to RELENG_6. This is why the machdep sysctls for i386/amd64 are introduced. Are you satisfied with this ? I, even after help from Kris Kennaway, still unable to provide the solution that does not broke something, at least without manual intervention (aka sysctl). --NHfequSh1hmJPP0s Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHUsGXC3+MBN1Mb4gRAjVjAKCu80neeehUtfD+mlzJAjf6h+ipSACfUmKB Fb607DEcaEyPzCk65Zg970M= =FaNf -----END PGP SIGNATURE----- --NHfequSh1hmJPP0s--