Created attachment 49699 [details]
Sample code to demonstrate the bug
In the attached sample code, the left and right sides should be the same, and in PNG output they are.
However, in PDF output, the right side is incorrect: the stroke is clipped even after the clip has been reset. A second stroke command does 'break out' of the clip. Also, it appears to be necessary to perform a fill within the clip before resetting in order to produce the bug.
Created attachment 49700 [details]
The incorrect pdf output
Created attachment 49701 [details]
The expected PNG output
Fixed in master with http://cgit.freedesktop.org/cairo/commit/?id=c1b0e73578fe2528c8e68e309fd602acaef42e67
The fill and stroke were combined to use the PDF fill-stroke operator but cairo was not noticing that the clip had changed between the fill and stroke.