diff options
author | Ned Deily <nad@python.org> | 2016-08-15 18:40:38 (GMT) |
---|---|---|
committer | Ned Deily <nad@python.org> | 2016-08-15 18:40:38 (GMT) |
commit | eb3be66b3a825c56bb2bcd9ce4ad237585187c64 (patch) | |
tree | d63ba8153677430a143d994005e2268298b16e7e | |
parent | 652bad4f4aea91966bac69c7405351eb8e475add (diff) | |
download | cpython-eb3be66b3a825c56bb2bcd9ce4ad237585187c64.zip cpython-eb3be66b3a825c56bb2bcd9ce4ad237585187c64.tar.gz cpython-eb3be66b3a825c56bb2bcd9ce4ad237585187c64.tar.bz2 |
Issue #27736: Prevent segfault after interpreter re-initialization due
to ref count problem introduced in code for Issue #27038 in 3.6.0a3.
Patch by Xiang Zhang.
-rw-r--r-- | Misc/NEWS | 4 | ||||
-rw-r--r-- | Modules/posixmodule.c | 2 |
2 files changed, 6 insertions, 0 deletions
@@ -57,6 +57,10 @@ Core and Builtins Library ------- +- Issue #27736: Prevent segfault after interpreter re-initialization due + to ref count problem introduced in code for Issue #27038 in 3.6.0a3. + Patch by Xiang Zhang. + - Issue #12345: Add mathemathcal constant tau to math and cmath. See also PEP 628. diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 52e465f..10d6bcb 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -13355,6 +13355,8 @@ INITFUNC(void) Py_DECREF(unicode); } PyModule_AddObject(m, "_have_functions", list); + + Py_INCREF((PyObject *) &DirEntryType); PyModule_AddObject(m, "DirEntry", (PyObject *)&DirEntryType); initialized = 1; |