bpo-37316: mmap.mmap() passes the wrong variable to PySys_Audit() (GH-14152)
Also, add a missing call to va_end() in PySys_Audit().
diff --git a/Lib/test/audit-tests.py b/Lib/test/audit-tests.py
index 7a7725f..ddeff22 100644
--- a/Lib/test/audit-tests.py
+++ b/Lib/test/audit-tests.py
@@ -261,6 +261,13 @@
assertSequenceEqual(["call"] * 4, traced)
+def test_mmap():
+ import mmap
+ with TestHook() as hook:
+ mmap.mmap(-1, 8)
+ assertEqual(hook.seen[0][1][:2], (-1, 8))
+
+
if __name__ == "__main__":
from test.libregrtest.setup import suppress_msvcrt_asserts
suppress_msvcrt_asserts(False)