From 3d4298697b41231690f93590e99f599b964f6a0d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 19 Jun 2019 12:47:56 +0200 Subject: Fix shift UB in constants We were shifting out the top bit of a signed integer. --- Zend/zend_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zend/zend_alloc.c') diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 9c081477d0..93660e1cdc 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -591,7 +591,7 @@ static zend_always_inline void zend_mm_bitset_reset_range(zend_mm_bitset *bitset if (pos != end) { /* reset bits from "bit" to ZEND_MM_BITSET_LEN-1 */ - tmp = ~((Z_L(1) << bit) - 1); + tmp = ~((Z_UL(1) << bit) - 1); bitset[pos++] &= ~tmp; while (pos != end) { /* set all bits */ -- cgit v1.2.1