gh-144316: Fix missing exception in _remote_debugging with debug=False (#144442)

This commit is contained in:
Taegyun Kim 2026-02-26 22:14:34 +01:00 committed by GitHub
parent 4401f23cbf
commit c2d3d6b0dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 21 additions and 5 deletions

View file

@ -1302,6 +1302,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",
@ -1311,7 +1312,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;
}