Skip to content

Commit 74f3bfc

Browse files
committed
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] <http://git.php.net/?p=php-src.git;a=commit;h=aaa1f90e3f90c24098fa55a7b868fdca0b89ee25>
1 parent 89b4a46 commit 74f3bfc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Zend/zend_long.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ typedef int32_t zend_off_t;
116116

117117
static const char long_min_digits[] = LONG_MIN_DIGITS;
118118

119-
#ifdef _WIN64
120-
# define ZEND_ADDR_FMT "0x%016I64x"
121-
#elif SIZEOF_SIZE_T == 4
119+
#if SIZEOF_SIZE_T == 4
122120
# define ZEND_ADDR_FMT "0x%08zx"
123121
#elif SIZEOF_SIZE_T == 8
124122
# define ZEND_ADDR_FMT "0x%016zx"

0 commit comments

Comments
 (0)