This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2008年08月14日 16:39 by kevinwatters, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg71135 - (view) | Author: Kevin Watters (kevinwatters) | Date: 2008年08月14日 16:39 | |
in Lib/ctypes/__init__.py the wstring_at and string_at functions are declared with CFUNCTYPE. This means that in Modules/_ctypes/callproc.c when the functions are invoked, Py_UNBLOCK_THREADS and Py_BLOCK_THREADS surround the call. But string_at and wstring_at call PyString_FromString and PyUnicode_FromWideChar, respectively. The solution (I think) is to declare the functions with PYFUNCTYPE instead, so that callproc.c doesn't release the GIL when calling them. |
|||
| msg71143 - (view) | Author: Thomas Heller (theller) * (Python committer) | Date: 2008年08月14日 19:06 | |
Good catch! Indeed, when PyString_FromString or PyUnicode_FromWideChar fail, Python crashes with Fatal Python error: PyThreadState_Get: no current thread in a debug build, and an access violation in a release build (tested on Windows). Also, your patch suggestion is absolutely correct and fixes the problem. |
|||
| msg71452 - (view) | Author: Thomas Heller (theller) * (Python committer) | Date: 2008年08月19日 17:23 | |
This is fixed now in SVN, in trunk, branches/py3k, and branches/release25-maint. Thanks again. |
|||
| msg73621 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2008年09月23日 08:23 | |
Reference to the SVN: - trunk: rev65681 - release25-maint branch: rev65858 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:37 | admin | set | github: 47804 |
| 2008年09月23日 08:23:52 | vstinner | set | nosy:
+ vstinner messages: + msg73621 |
| 2008年08月19日 17:23:37 | theller | set | status: open -> closed resolution: fixed messages: + msg71452 |
| 2008年08月14日 19:06:45 | theller | set | messages: + msg71143 |
| 2008年08月14日 16:39:51 | kevinwatters | create | |