From 1fb72d2ad243c965d4432b4e93884064001a2607 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 3 Dec 2017 22:12:11 +0200 Subject: bpo-32137: The repr of deeply nested dict now raises a RecursionError (#4570) instead of crashing due to a stack overflow. This perhaps will fix similar problems in other extension types. --- Objects/listobject.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'Objects/listobject.c') diff --git a/Objects/listobject.c b/Objects/listobject.c index 8576b7ae68..8794e37364 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -364,10 +364,7 @@ list_repr(PyListObject *v) goto error; } - if (Py_EnterRecursiveCall(" while getting the repr of a list")) - goto error; s = PyObject_Repr(v->ob_item[i]); - Py_LeaveRecursiveCall(); if (s == NULL) goto error; -- cgit v1.2.1