[3.14] gh-144316: Fix missing exception in _remote_debugging with debug=False (GH-144442) (#145280)

This commit is contained in:
Pablo Galindo Salgado 2026-02-26 22:39:48 +00:00 committed by GitHub
parent 856fdc6f6b
commit ded533b1fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 50 additions and 7 deletions

View file

@ -1134,6 +1134,7 @@ _Py_RemoteDebug_PagedReadRemoteMemory(proc_handle_t *handle,
if (entry->data == NULL) {
entry->data = PyMem_RawMalloc(page_size);
if (entry->data == NULL) {
PyErr_NoMemory();
_set_debug_exception_cause(PyExc_MemoryError,
"Cannot allocate %zu bytes for page cache entry "
"during read from PID %d at address 0x%lx",
@ -1143,7 +1144,7 @@ _Py_RemoteDebug_PagedReadRemoteMemory(proc_handle_t *handle,
}
if (_Py_RemoteDebug_ReadRemoteMemory(handle, page_base, page_size, entry->data) < 0) {
// Try to just copy the exact ammount as a fallback
// Try to just copy the exact amount as a fallback
PyErr_Clear();
goto fallback;
}