[Pkg-vsquare-devel] Bug#572261: New patch

Adrian Irving-Beer wisq-deb at wisq.net
Tue Mar 2 21:01:35 UTC 2010

tags 572261 + patch

Okay, this one doesn't leak *or* crash, so I think it's at least
vaguely correct. :)

Valgrind was getting confused by the memory buffers and blaming
slirp_input(), since that's where the original malloc() (via m_get)
occurs.  (Is that buffering really necessary?  Last I heard, GNU libc
takes steps to prevent memory fragmentation by doing its own internal
overallocation and handing out pieces of that to malloc() calls.)

The real source of the leak were in places like tcp_output() and
others, which prepare buffers for if_output().  They get queued for
sending, and eventually dequeued, but never m_free()d.

I'm not sure if the VDE developers intended for the m_free() to go in
if_output() or if_encap(), but it's not in either, and that's the
actual source of the leak.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slirp.patch
Type: text/x-diff
Size: 305 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-vsquare-devel/attachments/20100302/73378629/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-vsquare-devel/attachments/20100302/73378629/attachment.pgp>

More information about the Pkg-vsquare-devel mailing list