pixman: Branch 'master' - 3 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 1 20:21:55 UTC 2019
pixman/pixman-bits-image.c | 4 ++--
pixman/pixman-matrix.c | 2 +-
test/stress-test.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 85acb0a933bffbce6af03339546aff0a1eab5096
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Oct 31 17:27:38 2019 -0400
test: Fix unrepresentable subtraction in stress-test
Does not make the test pass, but does fix this error:
../test/stress-test.c:538:25: runtime error: signed integer overflow: 2147483647 - -2 cannot be represented in type 'int'
diff --git a/test/stress-test.c b/test/stress-test.c
index 6b4f7d6..13d9979 100644
--- a/test/stress-test.c
+++ b/test/stress-test.c
@@ -521,7 +521,7 @@ set_general_properties (pixman_image_t *image, pixman_bool_t allow_alpha_map)
if (image->type == BITS && prng_rand_n (8) != 0)
{
uint32_t width, height;
- int x, y;
+ uint32_t x, y;
int i;
/* Also add a couple of clip rectangles inside the image
commit 1f5b20c4aa19461a84799387c8e9107b6010ea24
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Oct 31 16:37:46 2019 -0400
pixman-matrix: Fix left shift of a negative number
../pixman/pixman-matrix.c:276:35: runtime error: left shift of negative value -32768
diff --git a/pixman/pixman-matrix.c b/pixman/pixman-matrix.c
index 4032c13..81b6e61 100644
--- a/pixman/pixman-matrix.c
+++ b/pixman/pixman-matrix.c
@@ -273,7 +273,7 @@ pixman_transform_point_31_16 (const pixman_transform_t *t,
{
/* the divisor is small, we can actually keep all the bits */
int64_t hi, rhi, lo, rlo;
- int64_t div = (divint << 16) + divfrac;
+ int64_t div = ((uint64_t)divint << 16) + divfrac;
fixed_64_16_to_int128 (tmp[0][0], tmp[0][1], &hi, &lo, 32);
rlo = rounded_sdiv_128_by_49 (hi, lo, div, &rhi);
commit bcfb3490db782ce5d2d6bd185b68f67bc6dfad06
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Oct 31 16:37:24 2019 -0400
pixman-bits-image: Fix left shift of a negative number
../pixman/pixman-bits-image.c:678:33: runtime error: left shift of negative value -32768
diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c
index ea74046..4cfabe3 100644
--- a/pixman/pixman-bits-image.c
+++ b/pixman/pixman-bits-image.c
@@ -674,8 +674,8 @@ __bits_image_fetch_general (pixman_iter_t *iter,
{
if (w != 0)
{
- x0 = ((pixman_fixed_48_16_t)x << 16) / w;
- y0 = ((pixman_fixed_48_16_t)y << 16) / w;
+ x0 = ((uint64_t)x << 16) / w;
+ y0 = ((uint64_t)y << 16) / w;
}
else
{
More information about the xorg-commit
mailing list