Message202796
| 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. |
|