From 5b0563f39eb29e4ae431717696174da5e282c346 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Mon, 30 Jul 2012 16:21:39 -0400 Subject: [PATCH] glyph-test: Avoid setting solid images as alpha maps. glyph-test would sometimes set a solid image as an alpha map, which is not allowed. When this happened and the debug spew was enabled, messages like this one would be generated: *** BUG *** In pixman_image_set_alpha_map: The expression !alpha_map || alpha_map->type == BITS was false Set a breakpoint on '_pixman_log_error' to debug Fix this by not passing the ALLOW_SOLID flag to create_image() when the resulting is to be used as an alpha map. --- test/glyph-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/glyph-test.c b/test/glyph-test.c index 0fb6641..84de5aa 100644 --- a/test/glyph-test.c +++ b/test/glyph-test.c @@ -199,7 +199,7 @@ create_image (int max_size, const pixman_format_code_t *formats, uint32_t flags) alpha_x = lcg_rand_n (width); alpha_y = lcg_rand_n (height); alpha_map = - create_image (max_size, formats, (flags & ~ALLOW_ALPHA_MAP)); + create_image (max_size, formats, (flags & ~(ALLOW_ALPHA_MAP | ALLOW_SOLID))); pixman_image_set_alpha_map (image, alpha_map, alpha_x, alpha_y); pixman_image_unref (alpha_map); } @@ -330,6 +330,6 @@ int main (int argc, const char *argv[]) { return fuzzer_test_main ("glyph", 30000, - 0x1B7696A2, + 0x741CB2DB, test_glyphs, argc, argv); } -- 2.7.4