Message202796
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. |
|
Date |
User |
Action |
Args |
2013-11-13 22:47:29 | vstinner | set | recipients:
+ vstinner, ncoghlan, pitrou, asvetlov, adamtj, neologix, Mark.Shannon, rosslagerwall, serhiy.storchaka, asuffield |
2013-11-13 22:47:29 | vstinner | set | messageid: <1384382849.2.0.664215397899.issue14432@psf.upfronthosting.co.za> |
2013-11-13 22:47:29 | vstinner | link | issue14432 messages |
2013-11-13 22:47:28 | vstinner | create | |
|