From owner-freebsd-ports@FreeBSD.ORG Thu Apr 22 12:37:43 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 7353816A4CE for ; Thu, 22 Apr 2004 12:37:43 -0700 (PDT) Received: from scaup.mail.pas.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6401543D49 for ; Thu, 22 Apr 2004 12:37:43 -0700 (PDT) (envelope-from mike@inbox.lv) Received: from pool0344.cvx38-bradley.dialup.earthlink.net ([216.244.31.89] helo=ringworm.mojavegreen.com) by scaup.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1BGk10-0001f7-00 for freebsd-ports@freebsd.org; Thu, 22 Apr 2004 12:37:42 -0700 Received: by ringworm.mojavegreen.com (Postfix, from userid 1000) id 719808455; Thu, 22 Apr 2004 12:24:36 -0700 (PDT) From: "Michael C. Shultz" Organization: Mojave Green Software co. To: freebsd-ports@freebsd.org Date: Thu, 22 Apr 2004 12:24:30 -0700 User-Agent: KMail/1.6.1 References: <86u0zgipdr.fsf@comcast.net> <200404182228.55828.ringworm@inbox.lv> <86k707j2ap.fsf@comcast.net> In-Reply-To: <86k707j2ap.fsf@comcast.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404221224.30616.ringworm@inbox.lv> 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: Thu, 22 Apr 2004 19:37:43 -0000 On Thursday 22 April 2004 11:27 am, Kaarthik Sivakumar wrote: > MCS> The error comes from freeing something that isn't allocated. You don't > have MCS> enough information here to find the problem. Where was "r" and > "q" malloc'ed? MCS> Are either of them being freed more than once? Did one > of them get their MCS> address reassigned? A quick thing you can do is > comment out the free's, if MCS> the problem goes away then you'll know > which variable is the culprit. > > I ran it without the free on line 381 as you and Kirill Ponomarew > suggested and that gets rid of the message. But > according to one person who mailed me in private (and this seems to be > most likely thing to have happened), I quote > > "0x6f732e in x86's representation is 2e 73 6f 00, which is '.so\0'. It > looks like something else (probably a string mentioning the filename of > a shared library) has overwritten the pointer." > > So it looks like something just overwrote that memory location and > that free(p) should really be there. I suspect that without the free > in line 381, the program will likely leak memory for every string that > it is given. > > Am I the only one getting this? I just installed this straight from > the ports. My system is > > FreeBSD the-saint 5.2-RC2 FreeBSD 5.2-RC2 #0: Sat Mar 13 20:37:02 EST 2004 > kaarthik@the-saint:/usr/src/sys/i386/compile/THE-SAINT i386 > > Isnt anyone else getting this problem? > > kaarthik I meant for you to comment the "free" out only to find the problem, not as a fix, of course it will leak memory when you do that. Anyways I think you found the problem ( good job! ) now just to get your information to the author so he can fix it..... -Mike