closes bpo-32898: Fix debug build crash with COUNT_ALLOCS (GH-5800) · pythoncapi/cpython@745dc65 · GitHub
Skip to content

Commit 745dc65

Browse files
eduardo-elizondobenjaminp
authored andcommitted
closes bpo-32898: Fix debug build crash with COUNT_ALLOCS (pythonGH-5800)
1 parent c84cf6c commit 745dc65

5 files changed

Lines changed: 6 additions & 3 deletions

File tree

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix the python debug build when using COUNT_ALLOCS.

Objects/listobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static void
8686
show_alloc(void)
8787
{
8888
PyInterpreterState *interp = PyThreadState_GET()->interp;
89-
if (!inter->core_config.show_alloc_count) {
89+
if (!interp->core_config.show_alloc_count) {
9090
return;
9191
}
9292

Objects/object.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,11 @@ void
9797
dump_counts(FILE* f)
9898
{
9999
PyInterpreterState *interp = PyThreadState_GET()->interp;
100-
if (!inter->core_config.show_alloc_count) {
100+
if (!interp->core_config.show_alloc_count) {
101101
return;
102102
}
103103

104+
PyTypeObject *tp;
104105
for (tp = type_list; tp; tp = tp->tp_next)
105106
fprintf(f, "%s alloc'd: %" PY_FORMAT_SIZE_T "d, "
106107
"freed: %" PY_FORMAT_SIZE_T "d, "

Objects/tupleobject.c

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)