mirror of
https://github.com/python/cpython.git
synced 2026-06-28 20:00:46 +00:00
[3.15] gh-149619: Harden _remote_debugging error paths (GH-150349) (#150435)
(cherry picked from commit a5be25d3bd)
This commit is contained in:
parent
d23b06b2a8
commit
d5381e18b8
11 changed files with 597 additions and 196 deletions
|
|
@ -47,7 +47,6 @@ cache_tlbc_array(RemoteUnwinderObject *unwinder, uintptr_t code_addr, uintptr_t
|
|||
|
||||
// Read the TLBC array pointer
|
||||
if (read_ptr(unwinder, tlbc_array_addr, &tlbc_array_ptr) != 0) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "Failed to read TLBC array pointer");
|
||||
set_exception_cause(unwinder, PyExc_RuntimeError, "Failed to read TLBC array pointer");
|
||||
return 0; // Read error
|
||||
}
|
||||
|
|
@ -61,7 +60,6 @@ cache_tlbc_array(RemoteUnwinderObject *unwinder, uintptr_t code_addr, uintptr_t
|
|||
// Read the TLBC array size
|
||||
Py_ssize_t tlbc_size;
|
||||
if (_Py_RemoteDebug_PagedReadRemoteMemory(&unwinder->handle, tlbc_array_ptr, sizeof(tlbc_size), &tlbc_size) != 0) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "Failed to read TLBC array size");
|
||||
set_exception_cause(unwinder, PyExc_RuntimeError, "Failed to read TLBC array size");
|
||||
return 0; // Read error
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue