From ea6da303960707c8305a74f7a33f5694f8f0b235 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sat, 20 Sep 2014 02:14:35 +0200 Subject: [PATCH] make the return value more logic as if clz() were returning 32 on empty size --- Zend/zend_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 77a825115fc..ac403617a60 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -1054,7 +1054,7 @@ static zend_always_inline int zend_mm_small_size_to_bit(int size) if (!BitScanReverse(&index, (unsigned long)size)) { /* undefined behavior */ - return 32; + return 64; } return (((31 - (int)index) ^ 0x1f) + 1);