[cairo-bugs] [Bug 87898] Memory leak in recording_pattern_get_surface

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Dec 31 03:04:18 PST 2014


Chris Wilson <chris at chris-wilson.co.uk> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Chris Wilson <chris at chris-wilson.co.uk> ---
commit 028d286e611d46755bb3d1e9932805de2ec35765
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Dec 31 10:54:43 2014 +0000

    xlib: Bump reference count for recording surface replays

    The snapshot takes a reference to the target recording surface in order
    to enable it for use by multiple treads. In order to balance this, the
    other two sources of recording surface must also take a reference and
    for us to release that reference after the replay.

    Otherwise, we end up with a memory leak:

    ==1== 1,392 bytes in 3 blocks are definitely lost in loss record 1 of 7
    ==1==    at 0x4A06BCF: malloc (in
    ==1==    by 0x4C7042D: _cairo_recording_surface_snapshot
    ==1==    by 0x4C842BE: _cairo_surface_snapshot_copy_on_write
    ==1==    by 0x4C7E7E0: _cairo_surface_detach_snapshot
    ==1==    by 0x4C7E55B: _cairo_surface_detach_snapshots
    ==1==    by 0x4C7E55B: _cairo_surface_flush
    ==1==    by 0x4C7E6CC: _cairo_surface_finish_snapshots
    ==1==    by 0x4C7E6CC: cairo_surface_destroy
    ==1==    by 0x4C625A7: cairo_pattern_destroy
    ==1==    by 0x4C3FAC6: _cairo_gstate_fini (cairo/src/cairo-gstate.c:225)
    ==1==    by 0x4C3C68C: _cairo_default_context_fini
    ==1==    by 0x4C3C708: _cairo_default_context_destroy
    ==1==    by 0x43E576: record_get (cairo/test/record-extend.c:158)
    ==1==    by 0x43E576: record_replay (cairo/test/record-extend.c:173)
    ==1==    by 0x40E22D: cairo_test_for_target (cairo/test/cairo-test.c:929)
    ==1==    by 0x40E22D: _cairo_test_context_run_for_target
    ==1==    by 0x40B6C0: _cairo_test_runner_draw
    ==1==    by 0x40B6C0: main (cairo/test/cairo-test-runner.c:937)

    Reported-by: Massimo Valentini <mvalentini at src.gnome.org>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87898
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20141231/93ff0235/attachment-0001.html>

More information about the cairo-bugs mailing list