Skip to content

Commit 57cd5db

Browse files
committed
Change to look for MAP_ANON
1 parent cbe85e7 commit 57cd5db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/support/strace_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ def filter_memory(syscalls):
8181
def _filter(call):
8282
# mmap can operate on a fd or `NULL` which gives a block of memory.
8383
# Ignore the `NULL` ones.
84-
if call.syscall == 'mmap' and call.args[0] == 'NULL':
84+
if call.syscall == "mmap" and "MAP_ANON" in call.args[3]:
8585
return False
8686

87-
if call.syscall in ('munmap', 'mprotect'):
87+
if call.syscall in ("munmap", "mprotect"):
8888
return False
8989

9090
return True

0 commit comments

Comments
 (0)