FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-20891: Fix PyGILState_Ensure() by vstinner · Pull Request #4650 · python/cpython · GitHub

/ cpython Public

bpo-20891: Fix PyGILState_Ensure() - #4650

Merged
vstinner merged 2 commits into
python:masterfrom
vstinner:pygilstate_ensure
Nov 30, 2017
Merged

bpo-20891: Fix PyGILState_Ensure()#4650
vstinner merged 2 commits into
python:masterfrom
vstinner:pygilstate_ensure

Conversation

vstinner commented Nov 30, 2017
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

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.

https://bugs.python.org/issue20891

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.

pitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I don't see any obvious issues here. LGTM.

vstinner merged commit b4d1e1f into python:master Nov 30, 2017
vstinner deleted the pygilstate_ensure branch November 30, 2017 21:05
vstinner added a commit that referenced this pull request Nov 30, 2017
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.

(cherry picked from commit b4d1e1f)
vstinner added a commit that referenced this pull request Nov 30, 2017
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 b4d1e1f)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL