Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Modules/_remote_debugging/subprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pid_array_contains(pid_array_t *arr, pid_t pid)
/* Find child PIDs using BFS traversal of the pid->ppid mapping.
* all_pids and ppids must have the same count (parallel arrays).
* Returns 0 on success, -1 on error. */
static int
UNUSED static int
find_children_bfs(pid_t target_pid, int recursive,
pid_t *all_pids, pid_t *ppids, size_t pid_count,
pid_array_t *result)
Expand Down Expand Up @@ -307,6 +307,7 @@ get_child_pids_platform(pid_t target_pid, int recursive, pid_array_t *result)
PyErr_SetString(PyExc_OSError, "Failed to get process count");
goto done;
}
n_pids /= sizeof(pid_t);

/* Allocate buffer for PIDs (add some slack for new processes) */
int buffer_size = n_pids + 64;
Expand All @@ -322,6 +323,7 @@ get_child_pids_platform(pid_t target_pid, int recursive, pid_array_t *result)
PyErr_SetString(PyExc_OSError, "Failed to list PIDs");
goto done;
}
actual /= sizeof(pid_t);

/* Build pid -> ppid mapping */
ppids = (pid_t *)PyMem_Malloc(actual * sizeof(pid_t));
Expand Down
2 changes: 1 addition & 1 deletion Python/remote_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ _Py_RemoteDebug_ReadRemoteMemory(proc_handle_t *handle, uintptr_t remote_address
typedef int (*section_validator_t)(proc_handle_t *handle, uintptr_t address);

// Validate that a candidate address starts with _Py_Debug_Cookie.
static int
UNUSED static int
_Py_RemoteDebug_ValidatePyRuntimeCookie(proc_handle_t *handle, uintptr_t address)
{
if (address == 0) {
Expand Down
Loading