The following short program gives the error message: *** glibc detected *** double free or corruption: 0x082a7268 *** Aborted // start of program --- // gcc `pkg-config --cflags --libs cairo` test_surface_finish.c -o test_surface_finish #include <cairo.h> int main (void) { cairo_surface_t *surface; surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 10, 10); cairo_surface_finish (surface); cairo_surface_finish (surface); return 0; } // end of program -- I realise you would not deliberately call cairo_surface_finish() twice, but I think cairo should handle the situation gracefully.
Thanks for the report. It was definitely a bug. Fortunately, it was also very easy to fix. The code was just neglecting to actually set the surface->finished field. Now fixed in CVS, (and a test case added: cairo/test/surface-finish-twice.c).
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.