From owner-freebsd-current@FreeBSD.ORG Tue Mar 13 19:44:45 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6028A1065672 for ; Tue, 13 Mar 2012 19:44:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 1F1A88FC0C for ; Tue, 13 Mar 2012 19:44:45 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:49c2:80d2:e8ab:50b4] (unknown [IPv6:2001:7b8:3a7:0:49c2:80d2:e8ab:50b4]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 6068E5C37; Tue, 13 Mar 2012 20:44:44 +0100 (CET) Message-ID: <4F5FA3AB.9000102@FreeBSD.org> Date: Tue, 13 Mar 2012 20:44:43 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120229 Thunderbird/11.0 MIME-Version: 1.0 To: Alexandre Martins References: <201203121750.36937.alexandre.martins@netasq.com> <20120312175555.GE75778@deviant.kiev.zoral.com.ua> <201203131108.43815.alexandre.martins@netasq.com> In-Reply-To: <201203131108.43815.alexandre.martins@netasq.com> X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , freebsd-current@freebsd.org Subject: Re: Double free() in libc or gdb ? 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: Tue, 13 Mar 2012 19:44:45 -0000 On 2012-03-13 11:08, Alexandre Martins wrote: > On Monday 12 March 2012 18:55:55 Konstantin Belousov wrote: >> On Mon, Mar 12, 2012 at 05:50:33PM +0100, Alexandre Martins wrote: ... >>> I have the libc compilled with "MALLOC_DEBUG" flag to detect double free. >>> When i run this piece of code (attached file) thought GDB, i have this >>> assertion : >>> >>> Assertion failed: ((run->regs_mask[elm] & (1U << bit)) == 0), function >>> arena_run_reg_dalloc, file /usr/src/lib/libc/stdlib/malloc.c, line 2543. I have committed a fix for this assertion (actually a double free) in r232934. Can you please update to that revision, rebuild your gdb, and try again?