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

[3.15] gh-151126: Sets missing exceptions in `tkinter` and `socket` modules initializations (GH-152418) by miss-islington · Pull Request #152420 · python/cpython · GitHub

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

Filter by extension

Filter by extension .c  (2) .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,2 @@
Fix two crashes in :mod:`tkinter` and :mod:`socket` modules initialization
under a memory pressure. Sets missing :exc:`MemoryError`.
2 changes: 1 addition & 1 deletion Modules/_tkinter.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 @@ -3574,7 +3574,7 @@ PyInit__tkinter(void)

tcl_lock = PyThread_allocate_lock();
if (tcl_lock == NULL)
return NULL;
return PyErr_NoMemory();

m = PyModule_Create(&_tkintermodule);
if (m == NULL)
Expand Down
1 change: 1 addition & 0 deletions Modules/socketmodule.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 @@ -9288,6 +9288,7 @@ socket_exec(PyObject *m)
#if defined(USE_GETHOSTBYNAME_LOCK)
netdb_lock = PyThread_allocate_lock();
if (netdb_lock == NULL) {
PyErr_NoMemory();
goto error;
}
#endif
Expand Down
Loading

Back | FazBrowse Home | New Git URL