From owner-freebsd-current@FreeBSD.ORG Tue Mar 13 14:18:57 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 D2C48106564A for ; Tue, 13 Mar 2012 14:18:57 +0000 (UTC) (envelope-from freebsd-current@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id C6E068FC0A for ; Tue, 13 Mar 2012 14:18:56 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S7SYs-0005ax-1r for freebsd-current@freebsd.org; Tue, 13 Mar 2012 15:18:50 +0100 Received: from np-19-75.prenet.pl ([np-19-75.prenet.pl]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Mar 2012 15:18:50 +0100 Received: from jb.1234abcd by np-19-75.prenet.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Mar 2012 15:18:50 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-current@freebsd.org From: jb Date: Tue, 13 Mar 2012 14:18:31 +0000 (UTC) Lines: 32 Message-ID: References: <201203121750.36937.alexandre.martins@netasq.com> <20120312175555.GE75778@deviant.kiev.zoral.com.ua> <201203131108.43815.alexandre.martins@netasq.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 79.139.19.75 (Mozilla/5.0 (X11; FreeBSD i386; rv:9.0.1) Gecko/20100101 Firefox/9.0.1) 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 14:18:57 -0000 Alexandre Martins netasq.com> writes: > ... > first.c: > ... > second.c > ... > main.c > ... > while(42) How do you exit that loop ? > ... > Compilation and execution : > > gcc -shared -O0 -g second.c -o second.so > gcc -shared -O0 -g first.c -o libfirst.so > gcc -O0 -g toto.c -lfirst -L. -o test > export LD_LIBRARY_PATH=$PWD > gdb ./test > ... What is your toto.c (source code) ? What about your main.c in compilation ? jb