mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Backport my recent fix (rev. 2.40 of Python/pystate.c):
Fix: [ 1176893 ] Readline segfault by unsilly-ing PyGILState_Release(). Backport candidate.
This commit is contained in:
@@ -12,6 +12,12 @@ What's New in Python 2.4.2a
|
||||
Core and builtins
|
||||
-----------------
|
||||
|
||||
- It is now safe to call PyGILState_Release() before
|
||||
PyEval_InitThreads() (note that if there is reason to believe there
|
||||
are multiple threads around you still must call PyEval_InitThreads()
|
||||
before using the Python API; this fix is for extension modules that
|
||||
have no way of knowing if Python is multi-threaded yet).
|
||||
|
||||
- Typing Ctrl-C whilst raw_input() was waiting in a build with threads
|
||||
disabled caused a crash.
|
||||
|
||||
|
||||
@@ -503,6 +503,6 @@ PyGILState_Release(PyGILState_STATE oldstate)
|
||||
}
|
||||
/* Release the lock if necessary */
|
||||
else if (oldstate == PyGILState_UNLOCKED)
|
||||
PyEval_ReleaseThread(tcur);
|
||||
PyEval_SaveThread();
|
||||
}
|
||||
#endif /* WITH_THREAD */
|
||||
|
||||
Reference in New Issue
Block a user