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
Raising in an atexit function in dev mode crashes #90183
Comments
Issue found by Matt Wozniski: Running this with python3.10 -X dev segfaults: import atexit
def func():
atexit.unregister(func)
1/0
atexit.register(func) |
Interesting bug report! Thanks for the fix ;-) |
For me, the question is why would anyone call atexit.unregister() inside an atexit callback. Is it useful? atexit._run_exitfuncs() removes all registered callbacks. Py_Finalize() calls _PyAtExit_Call() which also removes all registered callbacks. |
Is not useful, is just an edge case |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: