diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-11-30 23:36:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-30 23:36:49 +0100 |
commit | e10c9de9d74fd4c26b32e6719d96f04a5be6987d (patch) | |
tree | d52af6d26b53ff529cfab22ea50bb6b5faea7a03 /Misc/NEWS.d/next/C API | |
parent | [3.6] make tags: index also Modules/_ctypes/ (#4648) (#4659) (diff) | |
download | cpython-e10c9de9d74fd4c26b32e6719d96f04a5be6987d.tar.gz cpython-e10c9de9d74fd4c26b32e6719d96f04a5be6987d.tar.bz2 cpython-e10c9de9d74fd4c26b32e6719d96f04a5be6987d.zip |
bpo-20891: Fix PyGILState_Ensure() (#4650) (#4655)
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.
Enhance also embedded tests, backport from master:
* Add test_pre_initialization_api()
* Set PYTHONIOENCODING environment variable in
test_forced_io_encoding()
(cherry picked from commit b4d1e1f7c1af6ae33f0e371576c8bcafedb099db)
Diffstat (limited to 'Misc/NEWS.d/next/C API')
-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 00000000000..e89cf1292af --- /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. |