Roundup Robot added the comment:
New changeset 758468cdf72c by Antoine Pitrou in branch '3.4':
Issue #21897: Fix a crash with the f_locals attribute with closure variables
when frame.clear() has been called.
http://hg.python.org/cpython/rev/758468cdf72c
New changeset bd6515070f9c by Antoine
Antoine Pitrou added the comment:
Patch committed. Thank you for reporting this issue!
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21897
Masami HIRATA added the comment:
Thanks, pitrou.
Your patch seems ok to me.
$ python3.4.1_with_patch -m unittest
.
--
Ran 1 test in 0.001s
It seems that this issue is same as
Antoine Pitrou added the comment:
Here is a patch with tests.
--
keywords: +patch
nosy: +benjamin.peterson
stage: - patch review
versions: +Python 3.5
Added file: http://bugs.python.org/file35834/f_locals_clear.patch
___
Python tracker
New submission from Masami HIRATA:
It seems that frame.f_locals causes segfault on Python =3.4.1
$ uname -a
Linux ashrose 3.2.0-61-generic #93-Ubuntu SMP Fri May 2 21:31:50 UTC 2014
x86_64 x86_64 x86_64 GNU/Linux
$ ls
test1.py
$ cat test1.py
import unittest
class
Stefan Krah added the comment:
6ab3193e890e exposes the issue.
--
nosy: +pitrou, skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21897
___
___
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