Skip to content

Commit 514d510

Browse files
author
Anselm Kruis
committed
Issue python#112: Prepare Stackless 3.5, fix the reference counting
Fix the reference counting in the slp_eval_frame_with_cleanup code path. It was broken by commit e39fd5a8501a. https://bitbucket.org/stackless-dev/stackless/issues/112
1 parent d16e3cb commit 514d510

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Python/ceval.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,6 +1778,7 @@ slp_eval_frame_value(PyFrameObject *f, int throwflag, PyObject *retval)
17781778
PyObject *exc = TOP();
17791779
if (PyLong_Check(exc))
17801780
exc = Py_None;
1781+
Py_INCREF(exc); /* Duplicating the exception on the stack */
17811782
PUSH(exc);
17821783
PUSH(retval);
17831784
/* XXX: The main loop contains a PREDICT(WITH_CLEANUP_FINISH);

0 commit comments

Comments
 (0)