You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Raising in an atexit function in dev mode crashes #90183
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:
assignee=Noneclosed_at=<Date2021-12-09.15:15:34.300>created_at=<Date2021-12-09.11:20:52.793>labels= ['3.10', '3.11']
title='Raising in an atexit function in dev mode crashes'updated_at=<Date2021-12-09.17:06:29.881>user='https://github.com/pablogsal'
New changeset f0d290d by Pablo Galindo Salgado in branch 'main': bpo-46025: Fix a crash in the atexit module for auto-unregistering functions (GH-30002) f0d290d
New changeset 934a24c by Miss Islington (bot) in branch '3.10': bpo-46025: Fix a crash in the atexit module for auto-unregistering functions (GH-30002) (GH-30005) 934a24c
Activity
pablogsal commentedon Dec 9, 2021
Issue found by Matt Wozniski:
Running this with python3.10 -X dev segfaults:
pablogsal commentedon Dec 9, 2021
New changeset f0d290d by Pablo Galindo Salgado in branch 'main':
bpo-46025: Fix a crash in the atexit module for auto-unregistering functions (GH-30002)
f0d290d
pablogsal commentedon Dec 9, 2021
New changeset 934a24c by Miss Islington (bot) in branch '3.10':
bpo-46025: Fix a crash in the atexit module for auto-unregistering functions (GH-30002) (GH-30005)
934a24c
vstinner commentedon Dec 9, 2021
Interesting bug report! Thanks for the fix ;-)
vstinner commentedon Dec 9, 2021
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.
pablogsal commentedon Dec 9, 2021
Is not useful, is just an edge case