Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eaa3bcc

Browse files
author
Tim Peters
committed
Issue #18942: sys._debugmallocstats() output was damaged on Windows.
_PyDebugAllocatorStats() called PyOS_snprintf() with a %zd format code, but MS doesn't support that code. Interpolated PY_FORMAT_SIZE_T in place of the "z".
1 parent 31b862d commit eaa3bcc

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ What's New in Python 3.3.3 release candidate 1?
1212
Core and Builtins
1313
-----------------
1414

15+
- Issue #18942: sys._debugmallocstats() output was damaged on Windows.
16+
1517
- Issue #18667: Add missing "HAVE_FCHOWNAT" symbol to posix._have_functions.
1618

1719
- Issue #18368: PyOS_StdioReadline() no longer leaks memory when realloc()

Objects/obmalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1761,7 +1761,7 @@ _PyDebugAllocatorStats(FILE *out,
17611761
char buf1[128];
17621762
char buf2[128];
17631763
PyOS_snprintf(buf1, sizeof(buf1),
1764-
"%d %ss * %zd bytes each",
1764+
"%d %ss * %" PY_FORMAT_SIZE_T "d bytes each",
17651765
num_blocks, block_name, sizeof_block);
17661766
PyOS_snprintf(buf2, sizeof(buf2),
17671767
"%48s ", buf1);

0 commit comments

Comments
 (0)