| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
|
Probably not worth backporting. |
Sorry, something went wrong.
| // Just pretend that we have an owned, cleared frame so frame_dealloc | ||
| // doesn't make the situation worse: | ||
| f->f_frame = (_PyInterpreterFrame *)f->_f_frame_data; | ||
| f->f_frame->owner = FRAME_CLEARED; |
There was a problem hiding this comment.
We should also remove the corresponding assert(frame->owner != FRAME_CLEARED) statements, especially since FRAME_CLEARED was never a valid member of enum _frameowner (it’s from enum _framestate).
Sorry, something went wrong.
GH-124148) The `owner` field of `_PyInterpreterFrame` is supposed to be a member of `enum _frameowner`, but `FRAME_CLEARED` is a member of `enum _framestate`. At present, it happens that `FRAME_CLEARED` is not numerically equal to any member of `enum _frameowner`, but that could change in the future. The code that incorrectly assigned `owner = FRAME_CLEARED` was deleted in commit a53cc3f (GH-116687). Remove the incorrect checks for `owner != FRAME_CLEARED` as well.
pythonGH-124148) The `owner` field of `_PyInterpreterFrame` is supposed to be a member of `enum _frameowner`, but `FRAME_CLEARED` is a member of `enum _framestate`. At present, it happens that `FRAME_CLEARED` is not numerically equal to any member of `enum _frameowner`, but that could change in the future. The code that incorrectly assigned `owner = FRAME_CLEARED` was deleted in commit a53cc3f (pythonGH-116687). Remove the incorrect checks for `owner != FRAME_CLEARED` as well.
| Back | FazBrowse Home | New Git URL |
After a discussion with @brandtbucher , we believe the test is not testing what it's supposed to anymore. No new frame is created during the frame allocation and the test lost its meaning. Under no circumstance this test is valid or checking something reasonable. So we should just remove this test.
The fundamental reason the test is invalid is that the current frame allocation code is immune from being interrupted by Python code that can somehow create the same frame object. So we also remove the dead code in frame allocation, and replace it with an assert and some comments.
There's no user observable behavior changes so I'll skip the news, unless someone disagrees.