From owner-freebsd-current@FreeBSD.ORG Mon Mar 12 17:56:03 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 A51D61065672 for ; Mon, 12 Mar 2012 17:56:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 1B1BB8FC12 for ; Mon, 12 Mar 2012 17:56:02 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q2CHttSI028601; Mon, 12 Mar 2012 19:55:55 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q2CHttJ0031475; Mon, 12 Mar 2012 19:55:55 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q2CHttUK031474; Mon, 12 Mar 2012 19:55:55 +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: Mon, 12 Mar 2012 19:55:55 +0200 From: Konstantin Belousov To: Alexandre Martins Message-ID: <20120312175555.GE75778@deviant.kiev.zoral.com.ua> References: <201203121750.36937.alexandre.martins@netasq.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aQ9bQ2P1cgctGzNX" Content-Disposition: inline In-Reply-To: <201203121750.36937.alexandre.martins@netasq.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: 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: Mon, 12 Mar 2012 17:56:03 -0000 --aQ9bQ2P1cgctGzNX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 12, 2012 at 05:50:33PM +0100, Alexandre Martins wrote: > Dear all, >=20 > I'm currently having some trouble with the dynamic loader. >=20 > 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=20 > assertion : >=20 > Assertion failed: ((run->regs_mask[elm] & (1U << bit)) =3D=3D 0), functio= n=20 > arena_run_reg_dalloc, file /usr/src/lib/libc/stdlib/malloc.c, line 2543. >=20 > But when i run the same binary without GDB, no assert. >=20 > I'm very confused. Can you help me to debug that ? There is no attachment. Put the source somewhere on web. --aQ9bQ2P1cgctGzNX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk9eOKsACgkQC3+MBN1Mb4jKJgCgjO2sXR3nCHAGyXp66PrOJFqX b4kAn3eihJiRnZYiP5Nrb4ev3Htu1Ttk =KAMW -----END PGP SIGNATURE----- --aQ9bQ2P1cgctGzNX--