[issue26558] Fix PyGILState_Check() with _testcapi.run_in_subinterp()

STINNER Victor report at bugs.python.org
Mon Mar 14 10:56:27 EDT 2016


STINNER Victor added the comment:

gil_check.patch: add more checks on the GIL

* PyGILState_Check() now returns 1 (success) before the creation of the GIL and
  after the destruction of the GIL
* Add a flag to disable PyGILState_Check(). Disable PyGILState_Check() when
  Py_NewInterpreter() is called
* Add assert(PyGILState_Check()) to:

  - _Py_dup()
  - _Py_fstat()
  - _Py_read()
  - _Py_write()
  - PyObject_Malloc()
  - PyObject_Calloc()
  - PyObject_Realloc()
  - PyObject_Free()

----------
keywords: +patch
Added file: http://bugs.python.org/file42161/gil_check.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26558>
_______________________________________


More information about the Python-bugs-list mailing list