diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-11-30 21:05:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-30 21:05:00 (GMT) |
commit | b4d1e1f7c1af6ae33f0e371576c8bcafedb099db (patch) | |
tree | 857873eca2c22a51524b53fb54e30ea9f66f66d7 /Misc | |
parent | 986375ebde0dd5ff2b7349e445a06bd28a3a8ee2 (diff) | |
download | cpython-b4d1e1f7c1af6ae33f0e371576c8bcafedb099db.zip cpython-b4d1e1f7c1af6ae33f0e371576c8bcafedb099db.tar.gz cpython-b4d1e1f7c1af6ae33f0e371576c8bcafedb099db.tar.bz2 |
bpo-20891: Fix PyGILState_Ensure() (#4650)
When PyGILState_Ensure() is called in a non-Python thread before
PyEval_InitThreads(), only call PyEval_InitThreads() after calling
PyThreadState_New() to fix a crash.
Add an unit test in test_embed.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/C API/2017-11-30-18-13-45.bpo-20891.wBnMdF.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/C API/2017-11-30-18-13-45.bpo-20891.wBnMdF.rst b/Misc/NEWS.d/next/C API/2017-11-30-18-13-45.bpo-20891.wBnMdF.rst new file mode 100644 index 0000000..e89cf12 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2017-11-30-18-13-45.bpo-20891.wBnMdF.rst @@ -0,0 +1,3 @@ +Fix PyGILState_Ensure(). When PyGILState_Ensure() is called in a non-Python +thread before PyEval_InitThreads(), only call PyEval_InitThreads() after +calling PyThreadState_New() to fix a crash. |