https://github.com/python/cpython/commit/b2f126c4a0bad66d4b51028e8754a18e59ad84bb
commit: b2f126c4a0bad66d4b51028e8754a18e59ad84bb
branch: main
author: Maurycy Pawłowski-Wieroński <[email protected]>
committer: pablogsal <[email protected]>
date: 2026-04-25T22:28:51+01:00
summary:
gh-148989: `_remote_debugging`: Remove dead code, unnecessary gc state read
(#148990)
dead code
files:
M Modules/_remote_debugging/threads.c
diff --git a/Modules/_remote_debugging/threads.c
b/Modules/_remote_debugging/threads.c
index 07f8148d7c941a..e303c667ea013a 100644
--- a/Modules/_remote_debugging/threads.c
+++ b/Modules/_remote_debugging/threads.c
@@ -314,19 +314,6 @@ unwind_stack_for_thread(
long tid = GET_MEMBER(long, ts,
unwinder->debug_offsets.thread_state.native_thread_id);
- // Read GC collecting state from the interpreter (before any skip checks)
- uintptr_t interp_addr = GET_MEMBER(uintptr_t, ts,
unwinder->debug_offsets.thread_state.interp);
-
- // Read the GC runtime state from the interpreter state
- uintptr_t gc_addr = interp_addr +
unwinder->debug_offsets.interpreter_state.gc;
- char gc_state[SIZEOF_GC_RUNTIME_STATE];
- if (_Py_RemoteDebug_PagedReadRemoteMemory(&unwinder->handle, gc_addr,
unwinder->debug_offsets.gc.size, gc_state) < 0) {
- set_exception_cause(unwinder, PyExc_RuntimeError, "Failed to read GC
state");
- goto error;
- }
- STATS_INC(unwinder, memory_reads);
- STATS_ADD(unwinder, memory_bytes_read, unwinder->debug_offsets.gc.size);
-
// Calculate thread status using flags (always)
int status_flags = 0;
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]