From owner-freebsd-ports@FreeBSD.ORG Mon Apr 19 00:16:18 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FFF516A4CE for ; Mon, 19 Apr 2004 00:16:18 -0700 (PDT) Received: from voodoo.oberon.net (voodoo.oberon.net [212.118.165.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id 213D643D1D for ; Mon, 19 Apr 2004 00:16:18 -0700 (PDT) (envelope-from krion@voodoo.oberon.net) Received: from krion by voodoo.oberon.net with local (Exim 4.32; FreeBSD) id 1BFT0s-000Gi9-NY; Mon, 19 Apr 2004 09:16:18 +0200 Date: Mon, 19 Apr 2004 09:16:18 +0200 From: Kirill Ponomarew To: Kaarthik Sivakumar Message-ID: <20040419071618.GA62425@voodoo.oberon.net> Mail-Followup-To: Kirill Ponomarew , Kaarthik Sivakumar , ports@freebsd.org References: <86u0zgipdr.fsf@comcast.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline In-Reply-To: <86u0zgipdr.fsf@comcast.net> X-NCC-Regid: de.oberon Sender: Kirill Ponomarew cc: ports@freebsd.org Subject: Re: devel/libidn: warning when freeing memory X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2004 07:16:18 -0000 --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Mon, Apr 19, 2004 at 12:05:20AM -0400, Kaarthik Sivakumar wrote: > When idn is run, it prints the following message for any string given > to it: >=20 > idn in free(): error: junk pointer, too high to make sense >=20 > After setting MALLOC_OPTIONS to A and compiling libidn with '-g', I > got the following backtrace: >=20 > ,---- > | (gdb) run > | Starting program: /usr/home/programs/libidn-0.4.2/src/.libs/idn > | libidn 0.4.2 > | Copyright 2002, 2003, 2004 Simon Josefsson. > | GNU Libidn comes with NO WARRANTY, to the extent permitted by law. > | You may redistribute copies of GNU Libidn under the terms of > | the GNU Lesser General Public License. For more information > | about these matters, see the file named COPYING.LIB. > | Type each input string on a line by itself, terminated by a newline cha= racter. > | test this string > | idn in free(): error: junk pointer, too high to make sense > |=20 > | Program received signal SIGABRT, Aborted. > | 0x281f1d4f in kill () from /lib/libc.so.5 > | (gdb) bt > | #0 0x281f1d4f in kill () from /lib/libc.so.5 > | #1 0x281e67f8 in raise () from /lib/libc.so.5 > | #2 0x2825ef02 in abort () from /lib/libc.so.5 > | #3 0x2825d67e in tcflow () from /lib/libc.so.5 > | #4 0x2825d6ab in tcflow () from /lib/libc.so.5 > | #5 0x2825e1d8 in tcflow () from /lib/libc.so.5 > | #6 0x2825e420 in free () from /lib/libc.so.5 > | #7 0x08049c1f in main (argc=3D1, argv=3D0xbfbfe9f0) at idn.c:381 > | #8 0x08048c62 in _start () > | (gdb) fr 7 > | #7 0x08049c1f in main (argc=3D1, argv=3D0xbfbfe9f0) at idn.c:381 > | 381 free (r); > | (gdb) l > | 376 argv[0], rc); > | 377 free (q); > | 378 return 1; > | 379 } > | 380 > | 381 free (r); > | 382 } > | 383 #endif > | 384 > | 385 if (args_info.debug_given) > | (gdb) p r > | $1 =3D 0x6f732e > | (gdb)=20 > `---- >=20 > I tried debugging but I couldnt figure out what was wrong. The address > seems low for stack addresses, but it is obviously high for a heap > address. Could you please try to run it without free(3) ? -Kirill --sdtB3X0nJg68CQEu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAg3zCQC1G6a60JuURAkAkAJ9tBq0b3atdSgyPu74mETUgEfy7sACg9Nuz PCj+ysvMBTkJkHfIUmi9onY= =v3L1 -----END PGP SIGNATURE----- --sdtB3X0nJg68CQEu--