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

[3.15] gh-151126: Fix a possible crash during the startup with no memory under `Py_STACKREF_DEBUG` (GH-152478) by miss-islington · Pull Request #152677 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) All 1 file type 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
6 changes: 6 additions & 0 deletions Python/pystate.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 @@ -655,6 +655,9 @@ init_interpreter(PyInterpreterState *interp,
NULL,
&alloc
);
if (interp->open_stackrefs_table == NULL) {
return _PyStatus_NO_MEMORY();
}
# ifdef Py_STACKREF_CLOSE_DEBUG
interp->closed_stackrefs_table = _Py_hashtable_new_full(
_Py_hashtable_hash_ptr,
Expand All @@ -663,6 +666,9 @@ init_interpreter(PyInterpreterState *interp,
NULL,
&alloc
);
if (interp->closed_stackrefs_table == NULL) {
return _PyStatus_NO_MEMORY();
}
# endif
_Py_stackref_associate(interp, Py_None, PyStackRef_None);
_Py_stackref_associate(interp, Py_False, PyStackRef_False);
Expand Down
Loading

Back | FazBrowse Home | New Git URL