After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 498395 - [pngenc] leaks buffer data memory
[pngenc] leaks buffer data memory
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.14
Other All
: Normal critical
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-20 03:47 UTC by bens
Modified: 2007-12-06 08:46 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
This attachment, when run as "python test.py" leaks memory. (683 bytes, text/plain)
2007-11-20 03:48 UTC, bens
  Details
Pipeline test addition to uncover bad leak in pngenc (1.85 KB, patch)
2007-11-20 08:45 UTC, René Stadler
committed Details | Review
Trivial fix for pngenc leaking all output buffer data (726 bytes, patch)
2007-11-20 08:46 UTC, René Stadler
committed Details | Review

Description bens 2007-11-20 03:47:34 UTC
Please describe the problem:
Demo code provided creates an incredibly fast memory leak, of about 20 MB/s on my laptop.  This memory leak is derived from my OLPC snapshot activity, which is currently unusable because it hits OOM mid-session, due to this leak.

Steps to reproduce:
Run example code.

Actual results:
Fast leak, followed by OOM.

Expected results:
nothing.

Does this happen every time?
Yes, both on OLPC and on Gentoo.

Other information:
Comment 1 bens 2007-11-20 03:48:53 UTC
Created attachment 99373 [details]
This attachment, when run as "python test.py" leaks memory.

This code is derived from a simple snapshot activity.  Just run it.
Comment 2 René Stadler 2007-11-20 07:48:12 UTC
pngenc is leaking buffer data for some reason, looking into it.
Comment 3 René Stadler 2007-11-20 08:45:17 UTC
Created attachment 99381 [details] [review]
Pipeline test addition to uncover bad leak in pngenc

This patch adds simple pipeline runs of pngenc, pngdec, jpegenc, jpegdec, smokeenc and smokedec to tests/check/pipelines/simple-launch-lines.c.

This makes check-valgrind find the leak.

Please re-assign this bug to gst-plugins-good, summary "[pngenc] leaks buffer data".
Comment 4 René Stadler 2007-11-20 08:46:06 UTC
Created attachment 99382 [details] [review]
Trivial fix for pngenc leaking all output buffer data
Comment 5 Stefan Sauer (gstreamer, gtkdoc dev) 2007-11-20 12:08:39 UTC
2007-11-20  Stefan Kost  <ensonic@users.sf.net>

	Patch by: René Stadler <mail at renestadler dot de>

	* ext/libpng/gstpngenc.c:
	  Don't leak buffer data memory. Fixes #498395.

2007-11-20  Stefan Kost  <ensonic@users.sf.net>

	Patch by: René Stadler <mail at renestadler dot de>

	* tests/check/pipelines/simple-launch-lines.c:
	  Tests for #498395.