From 27af60805c7b54cc45493acc76c665bec9778080 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 19 Sep 2023 16:13:19 +0200 Subject: [PATCH] gh-109496: Skip test_capi.test_decref_freed_object() on ASAN Skip test_decref_freed_object() of test_capi.test_misc if Python is built with ASAN, MSAN or UBSAN sanitizers. --- Lib/test/test_capi/test_misc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py index 57edacbae35634c..529c85e478eff75 100644 --- a/Lib/test/test_capi/test_misc.py +++ b/Lib/test/test_capi/test_misc.py @@ -325,6 +325,8 @@ def test_negative_refcount(self): @unittest.skipUnless(hasattr(_testcapi, 'decref_freed_object'), 'need _testcapi.decref_freed_object()') + @support.skip_if_sanitizer(reason="use after free on purpose", + address=True, memory=True, ub=True) def test_decref_freed_object(self): code = """ import _testcapi