[NumPy-Tickets] [NumPy] #1345: test_multiarray.TestIO.test_ascii segmentation fault with Python 2.7
NumPy Trac
numpy-tickets@scipy....
Wed May 5 00:02:27 CDT 2010
#1345: test_multiarray.TestIO.test_ascii segmentation fault with Python 2.7
------------------------+---------------------------------------------------
Reporter: bsouthey | Owner: somebody
Type: defect | Status: needs_review
Priority: high | Milestone: 2.0.0
Component: numpy.core | Version: 1.4.0rc1
Keywords: |
------------------------+---------------------------------------------------
Comment(by charris):
This looks reentrant:
PyGILState_STATE PyGILState_Ensure()¶
Ensure that the current thread is ready to call the Python C API
regardless of the current state of Python, or of the global interpreter
lock. This may be called as many times as desired by a thread as long as
each call is matched with a call to PyGILState_Release(). In general,
other thread-related APIs may be used between PyGILState_Ensure() and
PyGILState_Release() calls as long as the thread state is restored to its
previous state before the Release(). For example, normal usage of the
Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS macros is acceptable.
The return value is an opaque “handle” to the thread state when
PyGILState_Ensure() was called, and must be passed to PyGILState_Release()
to ensure Python is left in the same state. Even though recursive calls
are allowed, these handles cannot be shared - each unique call to
PyGILState_Ensure() must save the handle for its call to
PyGILState_Release().
When the function returns, the current thread will hold the GIL.
Failure is a fatal error.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1345#comment:4>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list