Skip to content

[3.15] gh-159739: Detect recursive untyped ctypes arguments (GH-160194) - #160350

Merged
JelleZijlstra merged 1 commit into
python:3.15from
miss-islington:backport-3e19e04-3.15
Oct 23, 2026
Merged

JelleZijlstra merged 1 commit into
python:3.15from
miss-islington:backport-3e19e04-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

as_parameter chains were recursion-checked for typed arguments but not for foreign calls without argtypes. A cyclic chain could exhaust the C stack and crash before the function was called. Apply the same recursion guard to untyped conversion. Backport to 3.15 and 3.14.
(cherry picked from commit 3e19e04)

Co-authored-by: Jelle Zijlstra jelle@openai.com

…160194)

_as_parameter_ chains were recursion-checked for typed arguments but not for foreign calls without argtypes. A cyclic chain could exhaust the C stack and crash before the function was called. Apply the same recursion guard to untyped conversion. Backport to 3.15 and 3.14.
(cherry picked from commit 3e19e04)

Co-authored-by: Jelle Zijlstra <jelle@openai.com>
@JelleZijlstra
JelleZijlstra enabled auto-merge (squash) October 22, 2026 22:22
@JelleZijlstra
JelleZijlstra merged commit 6dddf0b into python:3.15 Oct 23, 2026
98 of 100 checks passed
@miss-islington
miss-islington deleted the backport-3e19e04-3.15 branch October 23, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants