From: Victor Stinner Date: Fri, 12 Dec 2025 13:12:11 +0000 (+0100) Subject: gh-142627: Ignore anonymous mappings in Linux remote debugging (#142628) X-Git-Tag: v3.15.0a3~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0bca091a4f112b9f0beb4ce19dfac2a7fc50342;p=thirdparty%2FPython%2Fcpython.git gh-142627: Ignore anonymous mappings in Linux remote debugging (#142628) --- diff --git a/Python/remote_debug.h b/Python/remote_debug.h index 1c02870d3af4..d3932a3fd1e4 100644 --- a/Python/remote_debug.h +++ b/Python/remote_debug.h @@ -722,6 +722,11 @@ search_linux_map_for_section(proc_handle_t *handle, const char* secname, const c } const char *path = line + path_pos; + if (path[0] == '[' && path[strlen(path)-1] == ']') { + // Skip [heap], [stack], [anon:cpython:pymalloc], etc. + continue; + } + const char *filename = strrchr(path, '/'); if (filename) { filename++; // Move past the '/'