bpo-115773: Use the right variable name based on the field we are trying read (#118591)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
Abhinav Upadhyay 2024-05-07 20:20:41 +05:30 committed by GitHub
parent e5413ec783
commit 26bab423fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -553,12 +553,12 @@ get_stack_trace(PyObject* self, PyObject* args)
if (bytes_read == -1) { if (bytes_read == -1) {
return NULL; return NULL;
} }
off_t thread_state_list_head = local_debug_offsets.runtime_state.interpreters_head; off_t interpreter_state_list_head = local_debug_offsets.runtime_state.interpreters_head;
void* address_of_interpreter_state; void* address_of_interpreter_state;
bytes_read = read_memory( bytes_read = read_memory(
pid, pid,
(void*)(runtime_start_address + thread_state_list_head), (void*)(runtime_start_address + interpreter_state_list_head),
sizeof(void*), sizeof(void*),
&address_of_interpreter_state); &address_of_interpreter_state);
if (bytes_read == -1) { if (bytes_read == -1) {