]> granicus.if.org Git - python/commit
Issue #14432: Generator now clears the borrowed reference to the thread state
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 13 Dec 2013 01:37:09 +0000 (02:37 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 13 Dec 2013 01:37:09 +0000 (02:37 +0100)
commit66c6e9dcb4cea8cce36abbd95308aa15b3381bea
tree13f28d6fb2166c73a010000883647613d56819e3
parent9ffb1481d8103407d3d09d212993ab7c36c58087
Issue #14432: Generator now clears the borrowed reference to the thread state

Fix a crash when a generator is created in a C thread that is destroyed while
the generator is still used. The issue was that a generator contains a frame,
and the frame kept a reference to the Python state of the destroyed C thread.
The crash occurs when a trace function is setup.
Lib/test/test_threading.py
Misc/NEWS
Modules/_testcapimodule.c
Objects/genobject.c