You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Assertion failed: typeinfo->proto in PyCPointerType_from_param_impl when using deprecated POINTER(str) in argtypes #144100
importctypes# The specific bug is triggered by creating a POINTER type using a string # (which issues a DeprecationWarning) and then using it for argument conversion.BadType=ctypes.POINTER("BugTrigger")
# Load standard library (Linux/POSIX specific, matches the crash environment)libc=ctypes.CDLL(None)
# Use any standard function (e.g., getpid) to attach argtypesfunc=libc.getpidfunc.argtypes= (BadType,)
try:
# Calling the function forces ctypes to run PyCPointerType_from_param_impl# on the argument, triggering the "Assertion `typeinfo->proto' failed".func(ctypes.byref(ctypes.c_int(0)))
exceptException:
pass
Activity
pythongh-144100: Fix crash for POINTER(str) used in ctypes argtypes
gh-144100: Fix crash for POINTER(str) used in ctypes argtypes (#144108)
pythongh-144100: Fix crash for POINTER(str) used in ctypes argtypes (p…
vstinner commentedon Jan 26, 2026
Fixed. Thanks for the bug report.
[3.14] gh-144100: Fix crash for POINTER(str) used in ctypes argtypes (G…
[3.13] gh-144100: Fix crash for POINTER(str) used in ctypes argtypes (#…
pythongh-144100: Fix crash for POINTER(str) used in ctypes argtypes (p…