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 }}
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
Originally reported by: Anselm Kruis (Bitbucket: akruis, GitHub: akruis)
If you pickle an exhausted generator you get a SystemError (2.7-slp) or an access violation (3.x). The cause for this bug is obvious: generator->gi_frame is NULL and pricklepit.c gen_reduce() does not handle this situation.
The fix is simple: change gen_reduce() to return Py_None, if generator->gi_frame is NULL. change gen_setstate() to set gen->gi_frame to NULL, if the frame is Py_None.
Originally reported by: Anselm Kruis (Bitbucket: akruis, GitHub: akruis)
If you pickle an exhausted generator you get a SystemError (2.7-slp) or an access violation (3.x). The cause for this bug is obvious: generator->gi_frame is NULL and pricklepit.c gen_reduce() does not handle this situation.
The fix is simple: change gen_reduce() to return Py_None, if generator->gi_frame is NULL. change gen_setstate() to set gen->gi_frame to NULL, if the frame is Py_None.
The text was updated successfully, but these errors were encountered: