From 10268ac8797668c9618c66b1cc2239095b543a69 Mon Sep 17 00:00:00 2001 From: An Long Date: Mon, 6 Jul 2026 23:49:01 +0900 Subject: [PATCH 1/4] Set MemoryError in stackref array conversion --- Python/ceval.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Python/ceval.c b/Python/ceval.c index f3f03b28112137a..3f636c3416e1207 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1056,6 +1056,7 @@ _PyObjectArray_FromStackRefArray(_PyStackRef *input, Py_ssize_t nargs, PyObject // +1 in case PY_VECTORCALL_ARGUMENTS_OFFSET is set. result = PyMem_Malloc((nargs + 1) * sizeof(PyObject *)); if (result == NULL) { + PyErr_NoMemory(); return NULL; } } From ae062110b3c70714c3f88b2072abd232ae702a00 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2026 04:17:00 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst new file mode 100644 index 000000000000000..3cfcf80d275a8ea --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst @@ -0,0 +1,2 @@ +Fix a potential :exc:SystemError during vector calls when memory allocation fails. +A :exc:MemoryError is now raised instead. From 7fefb6e34440eec9dbd7a995f8015669cb155a57 Mon Sep 17 00:00:00 2001 From: An Long Date: Tue, 7 Jul 2026 21:45:58 +0900 Subject: [PATCH 3/4] Update Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst Co-authored-by: sobolevn --- .../2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst index 3cfcf80d275a8ea..7404f2e7132d1fe 100644 --- a/Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst +++ b/Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst @@ -1,2 +1,2 @@ -Fix a potential :exc:SystemError during vector calls when memory allocation fails. -A :exc:MemoryError is now raised instead. +Fix a potential :exc:`SystemError` during vector calls when memory allocation fails. +A :exc:`MemoryError` is now raised instead. From be2dd64eb139447abc878ccf5b4230ff8f0735f7 Mon Sep 17 00:00:00 2001 From: An Long Date: Tue, 7 Jul 2026 22:28:38 +0900 Subject: [PATCH 4/4] Fix news entry line separator --- .../2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst index 7404f2e7132d1fe..9ccfbff7ee69778 100644 --- a/Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst +++ b/Misc/NEWS.d/next/Core_and_Builtins/2026-07-07-04-16-48.gh-issue-153205.5fE8QZ.rst @@ -1,2 +1,2 @@ -Fix a potential :exc:`SystemError` during vector calls when memory allocation fails. -A :exc:`MemoryError` is now raised instead. +Fix a potential :exc:`SystemError` during vector calls when memory allocation fails. +A :exc:`MemoryError` is now raised instead.