[cairo] cairo 1.5.x and sparc
Chris Wilson
chris at chris-wilson.co.uk
Wed Dec 26 14:13:29 PST 2007
On Wed, 2007-12-26 at 14:21 -0500, Doug Klima wrote:
> Howdy all,
>
> Some Gentoo guys doing some Firefox 3 work on SPARCs have discovered a
> regression that's causing crashers in Firefox 3. They've managed to
> identify a few more apps as well, (vlc and gucharmap) and found the
> common thread being cairo.
>
> Long story short, using git-bisect they came up with
> http://gitweb.freedesktop.org/?p=cairo;a=commitdiff;h=901b0c97523a2da00ccf91cf4cee3bf55ce989b5
> as the bad patch.
>
> Using the latest git does not resolve the issue.
>
> Most of their debugging was done in a /query window to me on IRC, but
> our bug for it is http://bugs.gentoo.org/show_bug.cgi?id=203282
>
> Since it's SPARC I'd venture a guess it's some alignment issue but I
> haven't looked into it at all and won't be able to until after the New
> Year, which is why I'm just kicking this over to the ML.
Indeed, allocating the (1-byte) ops after the (2 x double) points should
fixup the alignment (provided that the sizeof (cairo_path_buf_t) also
satisfies the natural alignment).
diff --git a/src/cairo-path-fixed.c b/src/cairo-path-fixed.c
index ad73845..8140ed1 100644
--- a/src/cairo-path-fixed.c
+++ b/src/cairo-path-fixed.c
@@ -415,8 +415,8 @@ _cairo_path_buf_create (int buf_size)
buf->num_points = 0;
buf->buf_size = buf_size;
- buf->op = (cairo_path_op_t *) (buf + 1);
- buf->points = (cairo_point_t *) (buf->op + buf_size);
+ buf->points = (cairo_point_t *) (buf + 1);
+ buf->op = (cairo_path_op_t *) (buf->points + 2 * buf_size);
}
return buf;
More information about the cairo
mailing list