Skip to content

PyGILStateEnsure() (Probably) Crashes If Called After Finalization #124619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ericsnowcurrently opened this issue Sep 26, 2024 · 0 comments
Open
Labels
3.12 only security fixes 3.13 bugs and security fixes 3.14 bugs and security fixes topic-C-API type-bug An unexpected behavior, bug, or error

Comments

@ericsnowcurrently
Copy link
Member

ericsnowcurrently commented Sep 26, 2024

Bug report

Bug description:

I'm pretty sure PyGILState_Ensure() will crash if called after finalization, particularly in the case where the thread doesn't already have a thread state active. I noticed this while looking at the function for something else.

CC @gpshead

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 only security fixes 3.13 bugs and security fixes 3.14 bugs and security fixes topic-C-API type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant