From owner-freebsd-current@FreeBSD.ORG Mon Mar 12 16:50:58 2012 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 D13A6106564A for ; Mon, 12 Mar 2012 16:50:58 +0000 (UTC) (envelope-from alexandre.martins@netasq.com) Received: from work.netasq.com (mars.netasq.com [91.212.116.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4196E8FC1B for ; Mon, 12 Mar 2012 16:50:57 +0000 (UTC) Received: from pc-alex.netasq.com (unknown [10.2.40.253]) by work.netasq.com (Postfix) with ESMTPS id 55292740099 for ; Mon, 12 Mar 2012 17:49:07 +0100 (CET) From: Alexandre Martins Organization: NETASQ To: freebsd-current@freebsd.org Date: Mon, 12 Mar 2012 17:50:33 +0100 User-Agent: KMail/1.13.7 (FreeBSD/8.2-RELEASE; KDE/4.7.3; amd64; ; ) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4136842.SocrAYyRgt"; protocol="application/pkcs7-signature"; micalg=sha1 Content-Transfer-Encoding: 7bit Message-Id: <201203121750.36937.alexandre.martins@netasq.com> X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 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 16:50:59 -0000 --nextPart4136842.SocrAYyRgt Content-Type: multipart/mixed; boundary="Boundary-01=_aliXPnKyhLuiC9U" Content-Transfer-Encoding: 7bit --Boundary-01=_aliXPnKyhLuiC9U Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Dear all, I'm currently having some trouble with the dynamic loader. 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 : Assertion failed: ((run->regs_mask[elm] & (1U << bit)) =3D=3D 0), function= =20 arena_run_reg_dalloc, file /usr/src/lib/libc/stdlib/malloc.c, line 2543. But when i run the same binary without GDB, no assert. I'm very confused. Can you help me to debug that ? Best regards =2D-=20 Alexandre Martins NETASQ -- We secure IT --Boundary-01=_aliXPnKyhLuiC9U-- --nextPart4136842.SocrAYyRgt--