From: Christoph M. Becker Date: Mon, 11 May 2020 08:47:35 +0000 (+0200) Subject: Use supported printf format on Win64 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74f3bfc6eb7ec80287178e46bd5c269fd371ce5a;p=php 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] --- 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"