FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.9] bpo-45262, asyncio: Fix cache of the running loop holder (GH-28796) by miss-islington · Pull Request #28815 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) .rst  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prevent use-after-free in asyncio. Make sure the cached running loop holder gets cleared on dealloc to prevent use-after-free in get_running_loop
3 changes: 3 additions & 0 deletions Modules/_asynciomodule.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -3258,6 +3258,9 @@ new_running_loop_holder(PyObject *loop)
static void
PyRunningLoopHolder_tp_dealloc(PyRunningLoopHolder *rl)
{
if (cached_running_holder == (PyObject *)rl) {
cached_running_holder = NULL;
}
Py_CLEAR(rl->rl_loop);
PyObject_Free(rl);
}
Expand Down

Back | FazBrowse Home | New Git URL