From owner-freebsd-current@FreeBSD.ORG Wed Nov 30 12:30:26 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CFE8D16A41F; Wed, 30 Nov 2005 12:30:26 +0000 (GMT) (envelope-from q@galgenberg.net) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2936B43D49; Wed, 30 Nov 2005 12:30:24 +0000 (GMT) (envelope-from q@galgenberg.net) Received: from wrzx30.rz.uni-wuerzburg.de (wrzx30.rz.uni-wuerzburg.de [132.187.1.30]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id DA17813FC14; Wed, 30 Nov 2005 13:30:23 +0100 (CET) Received: from virusscan (localhost [127.0.0.1]) by wrzx30.rz.uni-wuerzburg.de (Postfix) with ESMTP id BF9189F4AC; Wed, 30 Nov 2005 13:30:23 +0100 (CET) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by wrzx30.rz.uni-wuerzburg.de (Postfix) with ESMTP id A46BB8E9C2; Wed, 30 Nov 2005 13:30:23 +0100 (CET) Received: from frodo.galgenberg.net (wwsx14.win-screen.uni-wuerzburg.de [132.187.253.14]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 6277713F992; Wed, 30 Nov 2005 13:30:23 +0100 (CET) Received: from coyote.q.local (gb-21-237.galgenberg.net [172.16.21.237]) by frodo.galgenberg.net (8.13.1/8.13.1) with ESMTP id jAUCUNil071901; Wed, 30 Nov 2005 13:30:23 +0100 (CET) (envelope-from q@galgenberg.net) Received: from roadrunner.q.local (roadrunner.q.local [192.168.0.148]) by coyote.q.local (8.13.4/8.13.4) with ESMTP id jAUCUMvR067811; Wed, 30 Nov 2005 13:30:22 +0100 (CET) (envelope-from q@galgenberg.net) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.4/8.13.4) with ESMTP id jAUCUMY1001963; Wed, 30 Nov 2005 13:30:22 +0100 (CET) (envelope-from q@galgenberg.net) Received: (from q@localhost) by roadrunner.q.local (8.13.4/8.13.4/Submit) id jAUCUJ5X001962; Wed, 30 Nov 2005 13:30:19 +0100 (CET) (envelope-from q@galgenberg.net) Date: Wed, 30 Nov 2005 13:30:19 +0100 From: Ulrich Spoerlein To: "Daniel O'Connor" Message-ID: <20051130123019.GA1068@galgenberg.net> Mail-Followup-To: Daniel O'Connor , freebsd-current@freebsd.org, Poul-Henning Kamp , Jason Evans , current@freebsd.org References: <6861.1133349506@critter.freebsd.dk> <200511302252.05741.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline In-Reply-To: <200511302252.05741.doconnor@gsoft.com.au> X-Virus-Scanned: by amavisd-new (Rechenzentrum Universitaet Wuerzburg) Cc: Poul-Henning Kamp , freebsd-current@freebsd.org, Jason Evans , current@freebsd.org Subject: Re: New libc malloc patch 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: Wed, 30 Nov 2005 12:30:27 -0000 --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Daniel O'Connor wrote: > On Wed, 30 Nov 2005 21:48, Poul-Henning Kamp wrote: > > In message <20051130111017.GA67032@galgenberg.net>, Ulrich Spoerlein wr= ites: > > >I just read that mmap() part and have to wonder: Is it possible to > > >introduce something like the guard pages that OpenBSD has implemented? > > >I'd love to try this out and see the dozens of applications that fail > > >due to off-by-one bugs. > > > > Guard-pages are very expensive and that is why I have not adopted > > OpenBSD's patch. Yes, of course it should be disabled as default, but if it could be implemented so you can switch at runtime or compile time (think INVARIANTS/WITNESS) *and* there is no penalty for the disabled case, that be nice. > > I would advocate that people use one of the dedicated debugging malloc > > implementations (ElectricFence ?) instead of putting too much overhead > > into our default malloc. >=20 > Electric fence is right. Although it IS slow, an order of magnitude or mo= re=20 > usually. Also if you do use it you'll probably have to bump up the=20 > vm.max_proc_mmap sysctl or it will fail to allocate memory. >=20 > Another good one is valgrind (and it detects more problems to boot :) Yes, I usualy use dmalloc and valgrind. It's sad other developers don't use any of these tools ... Ulrich Spoerlein --=20 PGP Key ID: F0DB9F44 Encrypted mail welcome! Fingerprint: F1CE D062 0CA9 ADE3 349B 2FE8 980A C6B5 F0DB 9F44 Ok, which part of "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn." didn't you understand? --ZPt4rx8FFjLCG7dd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDjZtbmArGtfDbn0QRAl4bAJ9tbnYVS6dcbs0yG71W0wAqyYclfACglQEV xGjhAX6qdaQbbafU2ESQqZU= =oPSq -----END PGP SIGNATURE----- --ZPt4rx8FFjLCG7dd--