From owner-freebsd-stable@FreeBSD.ORG Mon Mar 21 18:12:22 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B5F2D16A4CF for ; Mon, 21 Mar 2005 18:12:22 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56C1143D4C for ; Mon, 21 Mar 2005 18:12:22 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.1) id j2LIC932081684; Mon, 21 Mar 2005 12:12:09 -0600 (CST) (envelope-from dan) Date: Mon, 21 Mar 2005 12:12:09 -0600 From: Dan Nelson To: Bartosz Fabianowski Message-ID: <20050321181209.GG5243@dan.emsphone.com> References: <423F0418.3050702@chillt.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <423F0418.3050702@chillt.de> X-OS: FreeBSD 5.4-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.8i cc: freebsd-stable@freebsd.org Subject: Re: malloc() debugging flags broken on RELENG_5 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2005 18:12:22 -0000 In the last episode (Mar 21), Bartosz Fabianowski said: > Some commit in the last few weeks has broken the malloc() debug flags > on RELENG_5. According to the man page, a call to free() or realloc() > with a modified pointer should cause a warning. Setting the "A" flag > in either /etc/malloc.conf or MALLOC_OPTIONS should turn this into an > error. However, what happens is that this *always* causes an error. > And even setting the corresponding "a" flag does not turn it into a > warning. You're not running as root, are you? The A flag is always set for root or setuid processes as a security measure. There hasn't been any changes to the malloc code in 5.x since 5.3. > This is very unfortunate as some poorly written programs (KDE's > Kopete messenger in my case) seem to rely on the fact that free() and > realloc() with modified pointers are OK. File a bugreport; a program must pass the same pointer to free() that it received from malloc(). -- Dan Nelson dnelson@allantgroup.com