From 74f3bfc6eb7ec80287178e46bd5c269fd371ce5a Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 11 May 2020 10:47:35 +0200 Subject: [PATCH] Use supported printf format on Win64 Commit aaa1f90[1] dropped support for the custom `I` specifier, so we must no longer use it for `ZEND_ADDR_FMT`; otherwise there are segfaults when printing memory leaks, and maybe elsewhere. [1] --- Zend/zend_long.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Zend/zend_long.h b/Zend/zend_long.h index 3b651e69d0..917b110b94 100644 --- a/Zend/zend_long.h +++ b/Zend/zend_long.h @@ -116,9 +116,7 @@ typedef int32_t zend_off_t; static const char long_min_digits[] = LONG_MIN_DIGITS; -#ifdef _WIN64 -# define ZEND_ADDR_FMT "0x%016I64x" -#elif SIZEOF_SIZE_T == 4 +#if SIZEOF_SIZE_T == 4 # define ZEND_ADDR_FMT "0x%08zx" #elif SIZEOF_SIZE_T == 8 # define ZEND_ADDR_FMT "0x%016zx" -- 2.50.1