Memory leak in pango_layout_get_extents

Bug #837145 reported by Tim Penhey on 2011-08-30
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pango
Fix Released
Medium
Unity
Invalid
Undecided
Unassigned
pango1.0 (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned
unity (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned

Bug Description

Impact: there is a memory leak when using pango_layout_get_extents

Development Fix: the bug has been fixed in quantal

Stable Fix: simple patch accepted upstream at https://bugzilla.gnome.org/show_bug.cgi?id=678059

Regression Potential: could potentially cause other bugs

Test Case:
- Run the following code in a terminal (feel free to check the result of the GET first)
{{{
for size in 100 200 500; do
  echo With size $size
  GET https://bugzilla.gnome.org/attachment.cgi?id=216360 | sed s/100/$size/ > pango_leak.c
  gcc pango_leak.c `pkg-config --cflags --libs pangoft2` -o pango_leak
  valgrind ./pango_leak 2>&1 | grep ' lost' | cut -d" " -f 2-
done;
}}}

Observe that before the fix the possibly lost reported grows significantly which different loop counts, and that after the fix it does not.

-- End test case

Valgrind found a leak deep in the nested calls for 'pango_layout_get_extents'.

It appears to be not freeing something.

4,224 (512 direct, 3,712 indirect) bytes in 1 blocks are definitely lost
1,904 (768 direct, 1,136 indirect) bytes in 1 blocks are definitely lost
1,904 (768 direct, 1,136 indirect) bytes in 1 blocks are definitely lost

This from an hour long valgrind run.

Didier Roche (didrocks) on 2011-09-30
Changed in unity (Ubuntu):
status: New → Confirmed
Thomi Richards (thomir) wrote :
Changed in pango:
importance: Unknown → Medium
status: Unknown → New
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pango1.0 - 1.30.1-0ubuntu3

---------------
pango1.0 (1.30.1-0ubuntu3) quantal; urgency=low

  * debian/patches/00git_memory_leak.patch:
    - Fix memory leak (LP: #837145)
 -- Robert Ancell <email address hidden> Thu, 14 Jun 2012 13:10:17 +1200

Changed in pango1.0 (Ubuntu):
status: New → Fix Released
Omer Akram (om26er) wrote :

closing the unity bug since the leak was in pango itself.

Changed in unity:
status: Confirmed → Invalid
Changed in unity (Ubuntu):
status: Confirmed → Invalid
description: updated
Robert Ancell (robert-ancell) wrote :

The test case is the program but handing over to thumper to write a SRU detailed test case.

Changed in pango:
status: New → Fix Released
Changed in pango1.0 (Ubuntu Precise):
status: New → In Progress
Changed in unity (Ubuntu Precise):
status: New → Invalid
Brian Murray (brian-murray) wrote :

We still need a test case to be able to approve this for precise-proposed.

Tim Penhey (thumper) on 2012-07-03
description: updated

Hello Tim, or anyone else affected,

Accepted pango1.0 into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/pango1.0/1.30.0-0ubuntu3.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in pango1.0 (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Sebastien Bacher (seb128) wrote :

confirmed, the fix resolves the issue

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pango1.0 - 1.30.0-0ubuntu3.1

---------------
pango1.0 (1.30.0-0ubuntu3.1) precise-proposed; urgency=low

  * debian/patches/git_memory_leak.patch:
    - Fix memory leak (LP: #837145)
 -- Robert Ancell <email address hidden> Fri, 15 Jun 2012 10:10:12 +1200

Changed in pango1.0 (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.