Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
Crash report
What happened?
It's possible to segfault or abort a no-gil interpreter running withPYTHON_GIL=0 by callingatexit functions from threads:
fromthreadingimportThreadimportatexitdefg():passdeff():forxinrange(100):atexit.register(g)atexit._clear()atexit.register(g)forxinrange(100):Thread(target=f,args=()).start()
Found using fusil by@vstinner.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.14.0a1+ experimental free-threading build (heads/main-dirty:612ac283b81, Nov 16 2024, 01:37:56) [GCC 11.4.0]