mirror of
https://github.com/python/cpython.git
synced 2026-04-13 23:31:02 +00:00
gh-144316: Fix missing exception in _remote_debugging with debug=False (#144442)
This commit is contained in:
parent
4401f23cbf
commit
c2d3d6b0dd
7 changed files with 21 additions and 5 deletions
|
|
@ -446,6 +446,9 @@ parse_code_object(RemoteUnwinderObject *unwinder,
|
|||
if (tlbc_entry) {
|
||||
// Validate index bounds (also catches negative values since tlbc_index is signed)
|
||||
if (ctx->tlbc_index < 0 || ctx->tlbc_index >= tlbc_entry->tlbc_array_size) {
|
||||
PyErr_Format(PyExc_RuntimeError,
|
||||
"Invalid tlbc_index %d (array size %zd, corrupted remote memory)",
|
||||
ctx->tlbc_index, tlbc_entry->tlbc_array_size);
|
||||
set_exception_cause(unwinder, PyExc_RuntimeError,
|
||||
"Invalid tlbc_index (corrupted remote memory)");
|
||||
goto error;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue