Repository navigation
gh-159739: Detect recursive untyped ctypes arguments - #160194
JelleZijlstra merged 1 commit into
Conversation
_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.
|
Thanks @jelle-openai for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
|
Thanks @jelle-openai for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Thanks @jelle-openai for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15. |
…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>
|
GH-160350 is a backport of this pull request to the 3.15 branch. |
|
GH-160351 is a backport of this pull request to the 3.14 branch. |
|
Sorry @jelle-openai and @JelleZijlstra, I had trouble completing the backport. Please retry by removing and re-adding the "needs backport to 3.14" label. |
…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>
|
Sorry @jelle-openai and @JelleZijlstra, I had trouble completing the backport. Please retry by removing and re-adding the "needs backport to 3.15" label. |
… (#160351) _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>
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.