diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-02-01 11:57:28 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-02-01 11:57:28 (GMT) |
commit | 688b6dec4e8847a154ef27257069291175764794 (patch) | |
tree | dc9b066bff693558e1c406b531dc6c024dff4394 /Objects/tupleobject.c | |
parent | 581ce25e1ffa374e62547ef266b6326bee0c54e5 (diff) | |
download | cpython-688b6dec4e8847a154ef27257069291175764794.zip cpython-688b6dec4e8847a154ef27257069291175764794.tar.gz cpython-688b6dec4e8847a154ef27257069291175764794.tar.bz2 |
bpo-32137: The repr of deeply nested dict now raises a RecursionError (GH-4570) (GH-4689)
instead of crashing due to a stack overflow.
This perhaps will fix similar problems in other extension types.
(cherry picked from commit 1fb72d2ad243c965d4432b4e93884064001a2607)
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r-- | Objects/tupleobject.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 0dada74..047926f 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -300,10 +300,7 @@ tuplerepr(PyTupleObject *v) goto error; } - if (Py_EnterRecursiveCall(" while getting the repr of a tuple")) - goto error; s = PyObject_Repr(v->ob_item[i]); - Py_LeaveRecursiveCall(); if (s == NULL) goto error; |