This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Mark.Shannon, adamtj, asuffield, asvetlov, ncoghlan, neologix, pitrou, rosslagerwall, serhiy.storchaka, vstinner
Date 2013-11-13.22:47:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384382849.2.0.664215397899.issue14432@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-11-13 22:47:29vstinnersetrecipients: + vstinner, ncoghlan, pitrou, asvetlov, adamtj, neologix, Mark.Shannon, rosslagerwall, serhiy.storchaka, asuffield
2013-11-13 22:47:29vstinnersetmessageid: <1384382849.2.0.664215397899.issue14432@psf.upfronthosting.co.za>
2013-11-13 22:47:29vstinnerlinkissue14432 messages
2013-11-13 22:47:28vstinnercreate