Skip to content

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

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

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

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 e083505 into python:3.14 Oct 22, 2026
49 checks passed
@miss-islington
miss-islington deleted the backport-3e19e04-3.14 branch October 22, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants