We've noticed segfaults after main with an atexit handler. A minimal reproducer is something like:
$ python3.12 -m venv .venv
$ source .venv/bin/activate
$ pip install greenlet==3.4.0 gevent
$ python -c 'import atexit; atexit.register(lambda: print(urllib.request.urlopen("http://example.com"))); from gevent import monkey; monkey.patch_all(); import urllib.request; print(urllib.request.urlopen("http://example.com"))'
This doesn't segfault with older versions of greenlet, and seems to be caused by greenlet switching to using atexit handlers for its cleanup.
We've noticed segfaults after main with an
atexithandler. A minimal reproducer is something like:This doesn't segfault with older versions of
greenlet, and seems to be caused bygreenletswitching to usingatexithandlers for its cleanup.