From: Filipe Laíns Date: Mon, 20 Apr 2026 13:41:10 +0000 (+0100) Subject: GH-145278: also filter mmap2 in strace_helper.filter_memory (GH-148648) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=513db7211056f6ba5453eb32f12c88887425f2e7;p=thirdparty%2FPython%2Fcpython.git GH-145278: also filter mmap2 in strace_helper.filter_memory (GH-148648) Signed-off-by: Filipe Laíns --- diff --git a/Lib/test/support/strace_helper.py b/Lib/test/support/strace_helper.py index cf95f7bdc7d2..bf15283d3027 100644 --- a/Lib/test/support/strace_helper.py +++ b/Lib/test/support/strace_helper.py @@ -74,7 +74,7 @@ class StraceResult: 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]: + if call.syscall in ("mmap", "mmap2") and "MAP_ANON" in call.args[3]: return True if call.syscall in ("munmap", "mprotect"):