]> granicus.if.org Git - php/commitdiff
Use supported printf format on Win64
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 11 May 2020 08:47:35 +0000 (10:47 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 11 May 2020 08:49:44 +0000 (10:49 +0200)
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] <http://git.php.net/?p=php-src.git;a=commit;h=aaa1f90e3f90c24098fa55a7b868fdca0b89ee25>

Zend/zend_long.h

index 3b651e69d0a289c76f66193b697d6c2d46a411f7..917b110b94e4c040aaf8b2fa15d338c76851a9f0 100644 (file)
@@ -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"