Skip to content

[3.12] gh-122334: Fix crash when importing ssl after re-initialization (GH-122481)#122495

Merged
kumaraditya303 merged 1 commit intopython:3.12from
neonene:fix312-122334
Aug 2, 2024
Merged

[3.12] gh-122334: Fix crash when importing ssl after re-initialization (GH-122481)#122495
kumaraditya303 merged 1 commit intopython:3.12from
neonene:fix312-122334

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