Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Assertion failed: typeinfo->proto in PyCPointerType_from_param_impl when using deprecated POINTER(str) in argtypes #144100

Closed
Labels
@YuanchengJiang

Description

@YuanchengJiang

Bug report

Bug description:

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
python: ../Modules/_ctypes/_ctypes.c:1422: PyObject *PyCPointerType_from_param_impl(PyObject *, PyTypeObject *, PyObject *): Assertion `typeinfo->proto' failed.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp