Skip to content

Conversation

@VanshAgarwal24036
Copy link
Contributor

@VanshAgarwal24036 VanshAgarwal24036 commented Jan 21, 2026

It fixes a crash in ctypes that occur when a deprecated POINTER(str) type was used in argtypes.

When such a pointer type was encountered during argument conversion, ctypes would hit an internal assertion and abort the interpreter in debug builds.
This PR replaces the assertion with proper error handling and raises a Python exception instead.

@VanshAgarwal24036
Copy link
Contributor Author

CI note

The error in test_external_inspection does not seem related to this pull request.

This will only affect ctypes-based pointer argument conversions and introduces a regression test under test_ctypes. The failing test exercises external Inspection & frame caching in the interpreter (generated_cases.c.h) in debug mode, with the GILuntied.

There is no overlap in the code paths with ctypes, and I could not reproduce this failure locally. This appears to be a intermittent failure in CI rather than a regression caused by the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant