https://github.com/python/cpython/commit/513db7211056f6ba5453eb32f12c88887425f2e7
commit: 513db7211056f6ba5453eb32f12c88887425f2e7
branch: main
author: Filipe Laíns <[email protected]>
committer: encukou <[email protected]>
date: 2026-04-20T15:41:10+02:00
summary:

GH-145278: also filter mmap2 in strace_helper.filter_memory (GH-148648)

Signed-off-by: Filipe Laíns <[email protected]>

files:
M Lib/test/support/strace_helper.py

diff --git a/Lib/test/support/strace_helper.py 
b/Lib/test/support/strace_helper.py
index cf95f7bdc7d2ca..bf15283d3027da 100644
--- a/Lib/test/support/strace_helper.py
+++ b/Lib/test/support/strace_helper.py
@@ -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]:
+    if call.syscall in ("mmap", "mmap2") and "MAP_ANON" in call.args[3]:
         return True
 
     if call.syscall in ("munmap", "mprotect"):

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to