[cairo-bugs] [Bug 95227] [Patch] Cairo potentially spams stdout in certain places

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Aug 30 20:18:03 UTC 2016


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

Andrea Canciani <ranma42 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|chris at chris-wilson.co.uk    |ranma42 at gmail.com
             Status|NEEDINFO                    |ASSIGNED

--- Comment #4 from Andrea Canciani <ranma42 at gmail.com> ---
(In reply to Darxus from comment #3)
> Filenames and line numbers that are doing this?

You can find those in the diff file:

src/cairo-debug.c:265
src/cairo-pattern.c:4610,4617
src/cairo-surface-observer.c:1222

> 
> How to reproduce it?

I did not check throughly, but I am pretty confident that the issue in the
first file would only be visible when compiling cairo with TRACE-ing enabled
(manually, in src/cairoint.h), that is unusual and only meant for debugging.

The bugs in src/cairo-pattern.c would not be visible without some significant
changes, as all of the _cairo_debug_print_*pattern() functions are currently
dead code. Again, they are meant as an aid when debugging cairo itself and are
not (or at least should not be) exposed through the public API.

The last one looks like a genuine bug that can easily be triggered:

#include <cairo.h>

int
main (int argc, char *argv[])
{
    cairo_surface_t *image = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
32, 32);
    cairo_surface_t *surface = cairo_surface_create_observer (image,
CAIRO_SURFACE_OBSERVER_NORMAL);

    cairo_surface_mark_dirty (surface);

    cairo_surface_destroy (surface);
    cairo_surface_destroy (image);

    return 0;
}

All of the changes look good to me (the first two in order to improve
debugging, the last one as an actual bug fix). Only nit is I would also remove
one of the two consecutive blank lines in the change for
cairo-surface-observer.c ;)

If nobody raises concerns about the patch, I will merge it in the weekend.

-- 
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/20160830/25f37f5d/attachment.html>


More information about the cairo-bugs mailing list