[issue14432] Bug in generator if the generator in created in a C thread

2013-11-13 Thread STINNER Victor
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 funct

[issue14432] Bug in generator if the generator in created in a C thread

2013-09-12 Thread STINNER Victor
STINNER Victor added the comment: ping? (for myself :-)) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue14432] Bug in generator if the generator in created in a C thread

2012-04-16 Thread Andrew Suffield
Andrew Suffield added the comment: I think I've tripped over a variation on this theme using pyqt and 2.7: When working in a QThread, the PyGILState_Ensure call when transitioning control from Qt to python will frequently allocate a new thread state - because every time control returns to the

[issue14432] Bug in generator if the generator in created in a C thread

2012-04-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue14432] Bug in generator if the generator in created in a C thread

2012-04-11 Thread Mark Shannon
Mark Shannon added the comment: Rather than ensuring that f_tstate always points to the current frame, just remove it altogether. Patch attached -- nosy: +Mark.Shannon Added file: http://bugs.python.org/file25176/remove_f_tstate.patch ___ Python tra

[issue14432] Bug in generator if the generator in created in a C thread

2012-04-02 Thread Adam Tomjack
Adam Tomjack added the comment: For what it's worth, I think I've seen this bug in 2.6 and 2.5, using generators created in python threads, while profiling not tracing. I'm creating generators in one python thread and storing them in a variable. In a different python thread I overwrite the v

[issue14432] Bug in generator if the generator in created in a C thread

2012-03-28 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue14432] Bug in generator if the generator in created in a C thread

2012-03-28 Thread Nick Coghlan
Nick Coghlan added the comment: It may not even have to specifically test the crash - any operation that accessed the tstate on the frame and could be shown to be accessing the wrong thread state when called from another thread could demonstrate the problem. -- __

[issue14432] Bug in generator if the generator in created in a C thread

2012-03-28 Thread Nick Coghlan
Nick Coghlan added the comment: The proposed fix sounds reasonable to me. Would it be possible to work something into test_capi to actually test it? -- nosy: +ncoghlan ___ Python tracker _

[issue14432] Bug in generator if the generator in created in a C thread

2012-03-28 Thread Ross Lagerwall
Ross Lagerwall added the comment: Here's the patch ;-) -- keywords: +patch nosy: +rosslagerwall Added file: http://bugs.python.org/file25055/generator.patch ___ Python tracker _

[issue14432] Bug in generator if the generator in created in a C thread

2012-03-28 Thread STINNER Victor
New submission from STINNER Victor : We have a crash in our product when tracing is enabled by sys.settrace() and threading.settrace(). If a Python generator is created in a C thread, calling the generator later in another thread may crash if Python tracing is enabled. - the C thread calls PyGI