pixman: Branch 'master' - 2 commits

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Mon Sep 19 03:19:16 PDT 2011


 test/Makefile.am            |    2 +-
 test/region-contains-test.c |   15 ++++++++-------
 2 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 3432e1a3444a55f71e294da7d350957a8e1232c3
Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Mon Sep 19 06:17:58 2011 -0400

    Fix build on cygwin after commit efdf65c0c4fff551fb3cd9104deda9adb6261e22
    
    libutils depends on pixman and so needs to preceed it in the link order
    
    Found by tinderbox, see [1]
    
    [1] http://tinderbox.freedesktop.org/builds/2011-09-15-0005/logs/pixman/#build
    
    Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>

diff --git a/test/Makefile.am b/test/Makefile.am
index 4268cd7..802d3f4 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2,7 +2,7 @@ include $(top_srcdir)/test/Makefile.sources
 
 AM_CFLAGS = @OPENMP_CFLAGS@
 AM_LDFLAGS = @OPENMP_CFLAGS@ @TESTPROGS_EXTRA_LDFLAGS@
-LDADD = $(top_builddir)/pixman/libpixman-1.la libutils.la -lm  @PNG_LIBS@
+LDADD = libutils.la $(top_builddir)/pixman/libpixman-1.la -lm  @PNG_LIBS@
 INCLUDES = -I$(top_srcdir)/pixman -I$(top_builddir)/pixman @PNG_CFLAGS@
 
 libutils_la_SOURCES = $(libutils_sources) $(libutils_headers)
commit f9faf4df440366ed36b197dc09b1c2b51af3387b
Author: Søren Sandmann Pedersen <ssp at redhat.com>
Date:   Mon Sep 12 23:17:39 2011 -0400

    test: Use smaller boxes in region_contains_test()
    
    The boxes used region_contains_test() sometimes overflow causing
    
        *** BUG ***
        In pixman_region32_union_rect: Invalid rectangle passed
        Set a breakpoint on '_pixman_log_error' to debug
    
    messages to be printed when pixman is compiled with DEBUG. Fix this by
    dividing the x, y, w, h coordinates by 4 to prevent overflows.

diff --git a/test/region-contains-test.c b/test/region-contains-test.c
index d761c4b..b660fdf 100644
--- a/test/region-contains-test.c
+++ b/test/region-contains-test.c
@@ -13,14 +13,15 @@ make_random_region (pixman_region32_t *region)
     n_boxes = lcg_rand_n (64);
     while (n_boxes--)
     {
-	int32_t x1, y1, x2, y2;
+	int32_t x, y;
+	uint32_t w, h;
 
-	x1 = (int32_t)lcg_rand_u32();
-	y1 = (int32_t)lcg_rand_u32();
-	x2 = (int32_t)lcg_rand_u32();
-	y2 = (int32_t)lcg_rand_u32();
+	x = (int32_t)lcg_rand_u32() >> 2;
+	y = (int32_t)lcg_rand_u32() >> 2;
+	w = lcg_rand_u32() >> 2;
+	h = lcg_rand_u32() >> 2;
 
-	pixman_region32_union_rect (region, region, x1, y1, x2, y2);
+	pixman_region32_union_rect (region, region, x, y, w, h);
     }
 }
 
@@ -163,7 +164,7 @@ main (int argc, const char *argv[])
 {
     return fuzzer_test_main ("region_contains",
 			     1000000,
-			     0x86311506,
+			     0xD7C297CC,
 			     test_region_contains_rectangle,
 			     argc, argv);
 }


More information about the xorg-commit mailing list