diff -r d86eabe2c457 Python/ceval.c --- a/Python/ceval.c Mon Aug 08 03:11:06 2016 +0300 +++ b/Python/ceval.c Mon Aug 08 12:46:18 2016 +0800 @@ -4164,6 +4164,9 @@ goto raise_error; } + assert(type != NULL); + assert(value != NULL); + if (cause) { PyObject *fixed_cause; if (PyExceptionClass_Check(cause)) { @@ -4190,8 +4193,8 @@ PyErr_SetObject(type, value); /* PyErr_SetObject incref's its arguments */ - Py_XDECREF(value); - Py_XDECREF(type); + Py_DECREF(value); + Py_DECREF(type); return 0; raise_error: