[issue22851] core crashes

2014-11-12 Thread Matthias Klose
New submission from Matthias Klose: seen with the current 2.7 branch: $ cat > x.py def foo(): yield gen = foo() print gen.gi_frame.f_restricted for i in gen: pass print gen.gi_frame gen = foo() print gen.next() print gen.gi_frame.f_restricted $ python x.py False None None Segmentation fault P

[issue22851] core crashes

2014-11-12 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue22851] core crashes

2014-11-12 Thread eryksun
eryksun added the comment: This is related to the fix for issue 14432. gen_send_ex sets f->f_tstate to NULL, so PyFrame_IsRestricted segfaults: #define PyFrame_IsRestricted(f) \ ((f)->f_builtins != (f)->f_tstate->interp->builtins) -- nosy: +eryksun ___

[issue22851] core crashes

2014-11-12 Thread STINNER Victor
STINNER Victor added the comment: Related change: New changeset aa324af42c0e by Victor Stinner in branch '2.7': Issue #14432: Generator now clears the borrowed reference to the thread state http://hg.python.org/cpython/rev/aa324af42c0e -- ___ Python