[cairo] [PATCH] Fix a 'memory leak' in the image compositor
Uli Schlachter
psychon at znc.in
Sun Mar 11 09:18:47 UTC 2018
Hi Bryce,
On 10.02.2018 20:08, Uli Schlachter wrote:
> On 19.01.2018 00:54, Bryce Harrington wrote:
>> On Sat, Jan 13, 2018 at 02:49:52PM +0100, Uli Schlachter wrote:
>>> There is a global pixman_glyph_cache_t instance that is initialized on
>>> first use and shows up in valgrind output as a relatively large leak (I
>>> think it was about 200 KiB). The reason for this is that this cache is
>>> not freed by cairo_debug_reset_static_data().
>>>
>>> This commit wires up freeing the cache to
>>> cairo_debug_reset_static_data().
>>>
>>> This cache was introduced in commit 615205cf0729 from 2012.
>>>
>>> Signed-off-by: Uli Schlachter <psychon at znc.in>
>>
>> Offhand looks good to me. Have you run this against the test suite?
>
> Not really, no. I think I only ran this against one specific test to see
> if valgrind is content. Any reason that you expect this to go wrong?
Okay, I ran this against the test suite with CAIRO_TEST_TARGET=image.
Results with and without this patch on latest master:
491 Passed, 60 Failed [0 crashed, 14 expected], 27 Skipped
Preamble: 1 failed - font-variations
image (argb32): 43 failed - clip-operator clip-text coverage-rhombus
extended-blend-alpha extended-blend-mask extended-blend-alpha-mask
extended-blend-solid-alpha fallback halo halo-transform operator-clear
operator-source radial-gradient radial-gradient-source
radial-gradient-mask-source record-select-font-face
record-text-transform record1414x-select-font-face
record1414x-text-transform record2x-select-font-face
record2x-text-transform record90-select-font-face
record90-text-transform recordflip-whole-select-font-face
recordflip-whole-text-transform recordflip-select-font-face
recordflip-text-transform smask smask-text text-antialias-subpixel
text-antialias-subpixel-rgb text-antialias-subpixel-bgr
text-antialias-subpixel-vrgb text-antialias-subpixel-vbgr text-pattern
text-unhinted-metrics unbounded-operator user-font-proxy
user-font-rescale pthread-same-source pthread-show-text
ft-text-vertical-layout-type1 ft-text-antialias-none
image (rgb24): 45 failed - clip-operator clip-text coverage-rhombus
extended-blend extended-blend-alpha extended-blend-mask
extended-blend-alpha-mask extended-blend-solid
extended-blend-solid-alpha fallback halo halo-transform operator-clear
operator-source radial-gradient radial-gradient-source
radial-gradient-mask-source record-select-font-face
record-text-transform record1414x-select-font-face
record1414x-text-transform record2x-select-font-face
record2x-text-transform record90-select-font-face
record90-text-transform recordflip-whole-select-font-face
recordflip-whole-text-transform recordflip-select-font-face
recordflip-text-transform smask smask-text text-antialias-subpixel
text-antialias-subpixel-rgb text-antialias-subpixel-bgr
text-antialias-subpixel-vrgb text-antialias-subpixel-vbgr text-pattern
text-unhinted-metrics unbounded-operator user-font-proxy
user-font-rescale pthread-same-source pthread-show-text
ft-text-vertical-layout-type1 ft-text-antialias-none
Is this enough or do you want something more?
Cheers,
Uli
More information about the cairo
mailing list