Bug 88293 - self-copy crashes for a stack overflow with svg12 backend
Summary: self-copy crashes for a stack overflow with svg12 backend
Status: RESOLVED MOVED
Alias: None
Product: cairo
Classification: Unclassified
Component: pdf backend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Adrian Johnson
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-11 15:09 UTC by Massimo
Modified: 2018-08-25 13:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
quick hack (1.54 KB, text/plain)
2015-01-11 15:09 UTC, Massimo
Details

Description Massimo 2015-01-11 15:09:05 UTC
Created attachment 112093 [details]
quick hack

The problem is that with a paginated surface (pdf, svg)
 _cairo_recording_surface_break_self_copy_loop flushes
the internal recording surface, but not the parent which is
the snapshot_of of the paint source pattern. When later
detach_snapshots is invoked for the recording_surface
it creates a paint command that uses the same recording
surface as source and this results in a memory leak for
the pdf backend and an infinite recursion for the svg12
backend.

The attached quick hack flushes the pattern->surface before
adding the paint-command to the recording surface commands.


Reproduction step

(cd test && CAIRO_TEST_TARGET=pdf,svg12 .libs/cairo-test-suite -f self-copy)
Comment 1 GitLab Migration User 2018-08-25 13:54:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/cairo/cairo/issues/260.


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.