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
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=<Date2016-09-05.17:41:15.539>created_at=<Date2016-08-20.09:42:54.106>labels= ['interpreter-core']
title='PyFrameObject.f_gen can be left pointing to a dangling generator'updated_at=<Date2016-09-05.17:41:15.537>user='https://github.com/arigo'
PyFrameObject.f_gen is a pointer (not a reference) to a generator/coroutine object. But the latter doesn't always correctly clean it up when it dies. This pointer is used by frame.clear().
Here is an example I made, which ends in a segfault. This example assumes we apply the patch of bpo-27811 first, otherwise it just crashes earlier in the same way as bpo-27811.
# execute this with "python -Werror"importgcasyncdeff():
passcr=f()
frame=cr.cr_framedelcrgc.collect()
# create some randomness to reuse the memory just freed by 'cr'importasyncioprint("ping")
frame.clear()
Patch attached. No test, but you can copy the above example.
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: