[issue21897] frame.f_locals causes segfault on Python >=3.4.1
Antoine Pitrou
report at bugs.python.org
Wed Jul 2 02:16:16 CEST 2014
Antoine Pitrou added the comment:
Following patch seems to fix it, but I have to cook a proper test:
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -786,7 +786,7 @@ map_to_dict(PyObject *map, Py_ssize_t nm
PyObject *key = PyTuple_GET_ITEM(map, j);
PyObject *value = values[j];
assert(PyUnicode_Check(key));
- if (deref) {
+ if (deref && value != NULL) {
assert(PyCell_Check(value));
value = PyCell_GET(value);
}
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21897>
_______________________________________
More information about the Python-bugs-list
mailing list