]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-145278: also filter mmap2 in strace_helper.filter_memory (GH-148648)
authorFilipe Laíns <lains@riseup.net>
Mon, 20 Apr 2026 13:41:10 +0000 (14:41 +0100)
committerGitHub <noreply@github.com>
Mon, 20 Apr 2026 13:41:10 +0000 (15:41 +0200)
Signed-off-by: Filipe Laíns <lains@riseup.net>
Lib/test/support/strace_helper.py

index cf95f7bdc7d2cadfcaf75b00495b1db0315adcee..bf15283d3027da4b9565c2e1758671da8b9c323c 100644 (file)
@@ -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"):