]> granicus.if.org Git - python/commitdiff
closes bpo-32898: Fix debug build crash with COUNT_ALLOCS (GH-5800)
authorEddie Elizondo <eduardo.elizondorueda@gmail.com>
Thu, 22 Feb 2018 04:55:18 +0000 (20:55 -0800)
committerBenjamin Peterson <benjamin@python.org>
Thu, 22 Feb 2018 04:55:18 +0000 (20:55 -0800)
Misc/ACKS
Misc/NEWS.d/next/Build/2018-02-21-12-46-00.bpo-32898.M15bZh.rst [new file with mode: 0644]
Objects/listobject.c
Objects/object.c
Objects/tupleobject.c

index b15b20e6c1c02fd945bb8f6fda584504771ef288..2eddc56d34d3d3e6be55308379813df334c54741 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -425,6 +425,7 @@ Tal Einat
 Eric Eisner
 Andrew Eland
 Julien Élie
+Eduardo Elizondo
 Lance Ellinghaus
 Daniel Ellis
 Phil Elson
diff --git a/Misc/NEWS.d/next/Build/2018-02-21-12-46-00.bpo-32898.M15bZh.rst b/Misc/NEWS.d/next/Build/2018-02-21-12-46-00.bpo-32898.M15bZh.rst
new file mode 100644 (file)
index 0000000..4c75466
--- /dev/null
@@ -0,0 +1 @@
+Fix the python debug build when using COUNT_ALLOCS.
index f0fe962be941262d16dabe15ad0c4b4279e1ec96..c8ffeff09368de048b8837f7f5d4853da6f0231d 100644 (file)
@@ -86,7 +86,7 @@ static void
 show_alloc(void)
 {
     PyInterpreterState *interp = PyThreadState_GET()->interp;
-    if (!inter->core_config.show_alloc_count) {
+    if (!interp->core_config.show_alloc_count) {
         return;
     }
 
index fef57fce7ba7e60ae97354d993a4cb233cb5c98e..220aa90bf59c5bc4eefb2c8d70dca4405af58b59 100644 (file)
@@ -97,10 +97,11 @@ void
 dump_counts(FILE* f)
 {
     PyInterpreterState *interp = PyThreadState_GET()->interp;
-    if (!inter->core_config.show_alloc_count) {
+    if (!interp->core_config.show_alloc_count) {
         return;
     }
 
+    PyTypeObject *tp;
     for (tp = type_list; tp; tp = tp->tp_next)
         fprintf(f, "%s alloc'd: %" PY_FORMAT_SIZE_T "d, "
             "freed: %" PY_FORMAT_SIZE_T "d, "
index 39d43dd04a592dafd299569184d80d3e8f18fed5..9bb91a5e65a0a0da0e5c6c3bf6530e84a09dd630 100644 (file)
@@ -45,7 +45,7 @@ static void
 show_track(void)
 {
     PyInterpreterState *interp = PyThreadState_GET()->interp;
-    if (!inter->core_config.show_alloc_count) {
+    if (!interp->core_config.show_alloc_count) {
         return;
     }