Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b9e040 commit e2dffc0Copy full SHA for e2dffc0
2 files changed
Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 3.0 release candidate 1
12
Core and Builtins
13
-----------------
14
15
+- Issue #3663: Py_None was decref'd when printing SyntaxErrors.
16
+
17
- Issue #3657: Fix uninitialized memory read when pickling longs.
18
Found by valgrind.
19
Python/pythonrun.c
@@ -1242,7 +1242,10 @@ PyErr_PrintEx(int set_sys_last_vars)
1242
if (exception == NULL)
1243
return;
1244
PyErr_NormalizeException(&exception, &v, &tb);
1245
- tb = tb ? tb : Py_None;
+ if (tb == NULL) {
1246
+ tb = Py_None;
1247
+ Py_INCREF(tb);
1248
+ }
1249
PyException_SetTraceback(v, tb);
1250
1251
0 commit comments