Compiling cairo-1.0.0 with -fomit-frame-pointer in the CFLAGS triggers a bug in the version of libpixman (which is shipped with cairo). This bug has been fixed in the CVS version of cairo. So the soultion is either to filter -fomit-frame-pointer from the users CFLAGS or to backport the appropriate patch. Quoting from #cairo: <dcoutts> hmm, i'm now getting a more odd bug: <dcoutts> Program received signal SIGSEGV, Segmentation fault. <dcoutts> 0xb7f9258d in _cairo_pixman_have_mmx () from /usr/lib/libcairo.so.2 <dcoutts> this is when calling cairo_stroke() after doing a few line_to() ops <dcoutts> very odd <otaylor> dcoutts: Any strange compilation options? <otaylor> dcoutts: CVS or 1.0.0? <dcoutts> 1.0.0 <otaylor> dcoutts: there were bugs fixed with that function and -fomit-frame-pointer recently <dcoutts> ah <dcoutts> so if I compiled using -fomit-frame-pointer that might be the cause? <otaylor> dcoutts: it would be the cause <dcoutts> ok, let me re-emerge... And indeed re-emerging without -fomit-frame-pointer made the crash go away.
Created attachment 67279 [details, diff] cairo-1.0.0-omit_frame_pointer_fix.patch I'd rather go with the patch alternative. Could you confirm if this backported patch works for you? If not, please paste the backtrace after emerging cairo with FEATURES=nostrip. Thanks.
Yes that patch seems to cure the problem. I rebuilt with and without the patch just to check. It works with the patch and segfaults in /usr/lib/libcairo.so.2 without the patch. Good job Leonardo :-)
Good, cairo-1.0.0-r1 includes the patch. Thanks for the information.