[cairo-commit] test/big-trap.c test/Makefile.am

Carl Worth cworth at kemper.freedesktop.org
Wed Nov 22 16:52:58 PST 2006


 test/Makefile.am |    1 +
 test/big-trap.c  |   36 +++++++++++++++++++++++++++++++++++-
 2 files changed, 36 insertions(+), 1 deletion(-)

New commits:
diff-tree 02804773e7ef521adfbd26f90f303879198acde5 (from fdbb820ece5e6ab970cf6a9b756eebf7283c0597)
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Nov 22 16:52:18 2006 -0800

    give the big-trap test the XFAIL treatment.
    
    We'll need to rewrite this test (and the way cairo is compiled for
    testing) before it can exercise the bug of interest. In the
    meantime, let's just give it an "expected failure" status.

diff --git a/test/Makefile.am b/test/Makefile.am
index 61e40ba..f9f8a76 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -348,6 +348,7 @@ zero-alpha-ref.png
 # provide an explanation for the expected failure.
 XFAIL_TESTS =			\
 a8-mask				\
+big-trap			\
 extend-reflect			\
 filter-nearest-offset		\
 ft-text-vertical-layout-type1	\
diff --git a/test/big-trap.c b/test/big-trap.c
index b5e3255..e201b98 100644
--- a/test/big-trap.c
+++ b/test/big-trap.c
@@ -27,9 +27,43 @@
 
 static cairo_test_draw_function_t draw;
 
+/* This test was originally written to exercise a bug in pixman in
+ * which it would scribble all over memory when given a particular
+ * (and bogus) trapezoid. However, a recent change to
+ * _cairo_fixed_from_double changed the details of the bogus trapezoid
+ * (it overflows in a different way now), so the bug is being masked.
+ *
+ * According to Vladimir, (http://lists.freedesktop.org/archives/cairo/2006-November/008482.html):
+ *
+ *	Before the change, the two trapezoids that were generated were:
+ *
+ *	Trap[0]: T: 0x80000000 B: 0x80000003
+ *	   L: [(0x000a0000, 0x80000000) (0x00080000, 0x00080000)]
+ *	   R: [(0x01360000, 0x80000000) (0x01380000, 0x00080000)]
+ *	Trap[1]: T: 0x80000003 B: 0x00080000
+ *	   L: [(0x000a0000, 0x80000000) (0x00080000, 0x00080000)]
+ *	   R: [(0x01360000, 0x80000000) (0x01380000, 0x00080000)]
+ *
+ *	After the change, the L/R coordinates are identical for both traps, but
+ *	the top and bottom change:
+ *
+ *	Trap[0]: t: 0x80000000 b: 0xfda80003
+ *	   l: [(0x000a0000, 0x80000000) (0x00080000, 0x00080000)]
+ *	   r: [(0x01360000, 0x80000000) (0x01380000, 0x00080000)]
+ *	Trap[1]: t: 0xfda80003 b: 0x00080000
+ *	   l: [(0x000a0000, 0x80000000) (0x00080000, 0x00080000)]
+ *	   r: [(0x01360000, 0x80000000) (0x01380000, 0x00080000)]
+ *
+ * I think the fix we want here is to rewrite this test to call
+ * directly into pixman with the trapezoid of interest, (which will
+ * require adding a new way to configure cairo for "testing" which
+ * will prevent the hiding of internal library symbols.
+ */
+
 cairo_test_t test = {
     "big-trap",
-    "Test oversize trapezoid with a clip region",
+    "Test oversize trapezoid with a clip region"
+    "\nTest needs to be adjusted to trigger the original bug",
     100, 100,
     draw
 };


More information about the cairo-commit mailing list