Skip to content

Commit 73711a3

Browse files
committed
gh-142627: Ignore anonymous mappings in Linux remote debugging
1 parent ffc7172 commit 73711a3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Python/remote_debug.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,11 @@ search_linux_map_for_section(proc_handle_t *handle, const char* secname, const c
729729
filename = path; // No directories, or an empty string
730730
}
731731

732+
if (filename[0] == '[' && filename[strlen(filename)-1] == ']') {
733+
// Skip anonymous mapping: [heap], [anon:cpython:pymalloc], etc.
734+
continue;
735+
}
736+
732737
if (strstr(filename, substr)) {
733738
retval = search_elf_file_for_section(handle, secname, start, path);
734739
if (retval) {

0 commit comments

Comments
 (0)