KEMBAR78
[3.12] gh-122334: Fix crash when importing ssl after re-initialization (GH-122481) by neonene · Pull Request #122495 · python/cpython · GitHub
Skip to content

Conversation

@neonene
Copy link
Contributor

@neonene neonene commented Jul 31, 2024

The current METH_FASTCALL|METH_KEYWORDS functions in a non-builtin module can cause segfaults after restarting the main interpreter, invoking _PyArg_UnpackKeywords() with an insufficiently cleared _PyArg_Parser struct.

This patch fixes the invalidation of the static argument parsers.

This backport cannot test _zoneinfo extension since _datetime does single-phase init in 3.12.

(cherry picked from commit 9fc1c99 AKA gh-122481)

The current METH_FASTCALL|METH_KEYWORDS functions in a non-builtin module can cause segfaults after restarting the main interpreter, invoking _PyArg_UnpackKeywords() with an insufficiently cleared _PyArg_Parser struct.

This patch fixes the invalidation of the static argument parsers.
@kumaraditya303 kumaraditya303 enabled auto-merge (squash) August 2, 2024 13:40
@kumaraditya303 kumaraditya303 merged commit 6b8a9a1 into python:3.12 Aug 2, 2024
@neonene neonene deleted the fix312-122334 branch August 2, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants