Romain Beauxis
2009-Dec-08 16:08 UTC
[Icecast-dev] Memory leak on Icecast 2.3.2 / Debian ?
Hi all ! Le mardi 8 d?cembre 2009 05:36:53, Jussi Kukkonen a ?crit :> > The valgrind output seems to indicate a leak in libxml2, I'm gonna try > > to see if this is linked to the way the icecast or libxml package is > > compiled/patched in debian, but I'm not too familiar with this kind of > > problems, so if you have something to say about this issue, I'd love to > > hear about it! > > xmlEncodeEntitiesReentrant() return values must be freed, so probably > not a libxml problem. > > The Debian Testing Icecast source (2.3.2-4) does seem to have a case > where they are not freed: a do-while loop in stats.c:stats_get_xml() can > leak when breaking early. This code is not present in -kh17 that I'm > using and all xmlEncodeEntitiesReentrant() calls are fine there.I'm co-maintaining the Debian package. I have no time to test it myself right now, but I'd be interested to have your feedback and fix the issue if you find it. Romain
Jussi Kukkonen
2009-Dec-08 20:44 UTC
[Icecast-dev] Memory leak on Icecast 2.3.2 / Debian ?
Romain Beauxis wrote:> Le mardi 8 d?cembre 2009 05:36:53, Jussi Kukkonen a ?crit : >>> The valgrind output seems to indicate a leak in libxml2, I'm gonna try >>> to see if this is linked to the way the icecast or libxml package is >>> compiled/patched in debian, but I'm not too familiar with this kind of >>> problems, so if you have something to say about this issue, I'd love to >>> hear about it! >> xmlEncodeEntitiesReentrant() return values must be freed, so probably >> not a libxml problem. >> >> The Debian Testing Icecast source (2.3.2-4) does seem to have a case >> where they are not freed: a do-while loop in stats.c:stats_get_xml() can >> leak when breaking early. This code is not present in -kh17 that I'm >> using and all xmlEncodeEntitiesReentrant() calls are fine there. > > I'm co-maintaining the Debian package. I have no time to test it myself right > now, but I'd be interested to have your feedback and fix the issue if you find > it.I'm not a icecast developer so I have very little idea what the code in question does or how to test it. As a matter of fact I don't even have a build environment (or time) available here, this is why I didn't send a patch. But since you asked, attached are the missing frees for icecast2_2.3.2-4 in a totally untested drive-by-patching manner. Like I said the -kh17 I also happened to have did not have this specific code at all and the xmlEncodeEntitiesReentrant() calls were all fine. Hope this is at all helpful, Jussi -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: patch Url: http://lists.xiph.org/pipermail/icecast-dev/attachments/20091208/321bb64d/attachment.txt
On 08/12/09 20:44, Jussi Kukkonen wrote:> I'm not a icecast developer so I have very little idea what the code in > question does or how to test it. As a matter of fact I don't even have a > build environment (or time) available here, this is why I didn't send a > patch. > > But since you asked, attached are the missing frees for icecast2_2.3.2-4 > in a totally untested drive-by-patching manner. Like I said the -kh17 I > also happened to have did not have this specific code at all and the > xmlEncodeEntitiesReentrant() calls were all fine.The patch is fine, both kh and the trunk code use different code so those should not have this problem but feel free to report any issues like this. karl.