Skip to content
Merged
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
GH-145278: also filter mmap2 in strace_helper.filter_memory
Signed-off-by: Filipe Laíns <lains@riseup.net>
  • Loading branch information
FFY00 committed Apr 16, 2026
commit 1880772a8b938e01246da11930f7f8c46465576e
2 changes: 1 addition & 1 deletion Lib/test/support/strace_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def sections(self):
def _filter_memory_call(call):
# mmap can operate on a fd or "MAP_ANONYMOUS" which gives a block of memory.
# Ignore "MAP_ANONYMOUS + the "MAP_ANON" alias.
if call.syscall == "mmap" and "MAP_ANON" in call.args[3]:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also would be happy with call.syscall.startswith('mmap') here as a guard against mmap3 / future extensions as well.

if call.syscall in ("mmap", "mmap2") and "MAP_ANON" in call.args[3]:
return True

if call.syscall in ("munmap", "mprotect"):
Expand Down
Loading