]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-89363: Skip threading test_is_alive_after_fork() if ASAN (#109835)
authorVictor Stinner <vstinner@python.org>
Mon, 25 Sep 2023 16:02:04 +0000 (18:02 +0200)
committerGitHub <noreply@github.com>
Mon, 25 Sep 2023 16:02:04 +0000 (16:02 +0000)
Skip test_is_alive_after_fork() of test_threading if Python is built
with Address Sanitizer (ASAN).

Lib/test/_test_multiprocessing.py
Lib/test/test_threading.py

index 730b887dd4bcac36a48928f816ba11214067439f..756d6808518fc4469bd1f621374445916e23105f 100644 (file)
@@ -79,7 +79,7 @@ except ImportError:
 
 
 if support.check_sanitizer(address=True):
-    # bpo-45200: Skip multiprocessing tests if Python is built with ASAN to
+    # gh-89363: Skip multiprocessing tests if Python is built with ASAN to
     # work around a libasan race condition: dead lock in pthread_create().
     raise unittest.SkipTest("libasan has a pthread_create() dead lock")
 
index 6465a446565844eb5ac6a7e57bc918b2f763be18..9c16c4044f66a8c45f002914bfe74a4660460585 100644 (file)
@@ -572,6 +572,10 @@ class ThreadTests(BaseTestCase):
         self.assertEqual(err, b'')
 
     @support.requires_fork()
+    # gh-89363: Skip multiprocessing tests if Python is built with ASAN to
+    # work around a libasan race condition: dead lock in pthread_create().
+    @support.skip_if_sanitizer("libasan has a pthread_create() dead lock",
+                               address=True)
     def test_is_alive_after_fork(self):
         # Try hard to trigger #18418: is_alive() could sometimes be True on
         # threads that vanished after a fork.