devel/libidn: warning when freeing memory
Michael C. Shultz
ringworm at inbox.lv
Thu Apr 22 12:37:43 PDT 2004
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 at 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 at 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
More information about the freebsd-ports
mailing list