[cairo-bugs] [Bug 105466] Memory leak in cairo_show_text

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Apr 7 07:50:55 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=105466

Uli Schlachter <psychon at znc.in> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|REOPENED                    |RESOLVED

--- Comment #7 from Uli Schlachter <psychon at znc.in> ---
Call FcFini() to shutdown fontconfig.

And if you start seeing a 256k memory leak from pixman_glyph_cache_create(),
update to a cairo version that includes 1ed124ace20194.

With the above changes, here is my valgrind output for the example from comment
#5:

==5212== HEAP SUMMARY:
==5212==     in use at exit: 12,384 bytes in 6 blocks
==5212==   total heap usage: 5,704 allocs, 5,698 frees, 2,172,379 bytes
allocated
==5212== 
==5212== 2,064 bytes in 1 blocks are still reachable in loss record 1 of 6
==5212==    at 0x4C2EBA5: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5212==    by 0x5A27FCF: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A26B3E: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A28675: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x59E0508: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x400EF09: call_init.part.0 (dl-init.c:72)
==5212==    by 0x400F015: call_init (dl-init.c:118)
==5212==    by 0x400F015: _dl_init (dl-init.c:119)
==5212==    by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)
==5212== 
==5212== 2,064 bytes in 1 blocks are still reachable in loss record 2 of 6
==5212==    at 0x4C2EBA5: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5212==    by 0x5A27FCF: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A2563F: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A28707: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x59E0508: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x400EF09: call_init.part.0 (dl-init.c:72)
==5212==    by 0x400F015: call_init (dl-init.c:118)
==5212==    by 0x400F015: _dl_init (dl-init.c:119)
==5212==    by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)
==5212== 
==5212== 2,064 bytes in 1 blocks are still reachable in loss record 3 of 6
==5212==    at 0x4C2EBA5: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5212==    by 0x5A27FCF: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A4280F: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A0CB50: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A28690: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x59E0508: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x400EF09: call_init.part.0 (dl-init.c:72)
==5212==    by 0x400F015: call_init (dl-init.c:118)
==5212==    by 0x400F015: _dl_init (dl-init.c:119)
==5212==    by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)
==5212== 
==5212== 2,064 bytes in 1 blocks are still reachable in loss record 4 of 6
==5212==    at 0x4C2EBA5: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5212==    by 0x5A27FCF: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A6306F: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A0CB18: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A28690: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x59E0508: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x400EF09: call_init.part.0 (dl-init.c:72)
==5212==    by 0x400F015: call_init (dl-init.c:118)
==5212==    by 0x400F015: _dl_init (dl-init.c:119)
==5212==    by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)
==5212== 
==5212== 2,064 bytes in 1 blocks are still reachable in loss record 5 of 6
==5212==    at 0x4C2EBA5: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5212==    by 0x5A27FCF: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A6372F: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A28690: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x59E0508: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x400EF09: call_init.part.0 (dl-init.c:72)
==5212==    by 0x400F015: call_init (dl-init.c:118)
==5212==    by 0x400F015: _dl_init (dl-init.c:119)
==5212==    by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)
==5212== 
==5212== 2,064 bytes in 1 blocks are still reachable in loss record 6 of 6
==5212==    at 0x4C2EBA5: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5212==    by 0x5A27FCF: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A2B01F: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x5A286B0: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x59E0508: ??? (in
/usr/lib/x86_64-linux-gnu/libpixman-1.so.0.34.0)
==5212==    by 0x400EF09: call_init.part.0 (dl-init.c:72)
==5212==    by 0x400F015: call_init (dl-init.c:118)
==5212==    by 0x400F015: _dl_init (dl-init.c:119)
==5212==    by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so)
==5212== 
==5212== LEAK SUMMARY:
==5212==    definitely lost: 0 bytes in 0 blocks
==5212==    indirectly lost: 0 bytes in 0 blocks
==5212==      possibly lost: 0 bytes in 0 blocks
==5212==    still reachable: 12,384 bytes in 6 blocks
==5212==         suppressed: 0 bytes in 0 blocks

(No, pixman does not provide a function to destroy its global_implementation
variable that is allocated by _pixman_choose_implementation(); no, this is not
a real memory leak; no, this is not cairo's "fault")

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo-bugs/attachments/20180407/402364a6/attachment.html>


More information about the cairo-bugs mailing list