Date: Thu, 22 Apr 2004 12:24:30 -0700 From: "Michael C. Shultz" <ringworm@inbox.lv> To: freebsd-ports@freebsd.org Subject: Re: devel/libidn: warning when freeing memory Message-ID: <200404221224.30616.ringworm@inbox.lv> In-Reply-To: <86k707j2ap.fsf@comcast.net> References: <86u0zgipdr.fsf@comcast.net> <200404182228.55828.ringworm@inbox.lv> <86k707j2ap.fsf@comcast.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 > <krion@FreeBSD.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404221224.30616.ringworm>