GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.14] gh-151126: Fix a possible crash during the startup with no mem… · python/cpython@fd4965d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Python
    • pystate.c
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Python/pystate.c‎

Copy file name to clipboardExpand all lines: Python/pystate.c
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,9 @@ init_interpreter(PyInterpreterState *interp,
694694
NULL,
695695
&alloc
696696
);
697+
if (interp->open_stackrefs_table == NULL) {
698+
return _PyStatus_NO_MEMORY();
699+
}
697700
# ifdef Py_STACKREF_CLOSE_DEBUG
698701
interp->closed_stackrefs_table = _Py_hashtable_new_full(
699702
_Py_hashtable_hash_ptr,
@@ -702,6 +705,9 @@ init_interpreter(PyInterpreterState *interp,
702705
NULL,
703706
&alloc
704707
);
708+
if (interp->closed_stackrefs_table == NULL) {
709+
return _PyStatus_NO_MEMORY();
710+
}
705711
# endif
706712
_Py_stackref_associate(interp, Py_None, PyStackRef_None);
707713
_Py_stackref_associate(interp, Py_False, PyStackRef_False);

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.