STINNER Victor added the comment: Updated patch for Python 3.4:
- remove PyFrameObject.f_tstate attribute: the thread state can be easily retrieved, it is known where it is needed (see the patch). There is one function which doesn't know the thread state: _PyEval_CallTracing(), but this function was already calling PyEval_GetFrame() which calls PyThreadState_GET() internally, so... - add an unit test for this issue (generator created in a temporary C thread) It's really hard to reproduce the crash. I tried with my old tarball and I failed. I also tried with my unit test and I failed. I'm pretty sure that the crash can only be reproduced when Python is compiled is release mode. I reproduced the crash once with the unit test on an unpatched Python 3.4. For Python 2.7 and 3.3, what do you think of applying generator.patch? It looks simple and obvious. I don't know the impact on performances, but it should be very low. ---------- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file32605/issue14432.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14432> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com