]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-89363: Skip threading test_is_alive_after_fork() if ASAN (GH-109835) (...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 2 Oct 2023 15:36:04 +0000 (08:36 -0700)
committerGitHub <noreply@github.com>
Mon, 2 Oct 2023 15:36:04 +0000 (17:36 +0200)
gh-89363: Skip threading test_is_alive_after_fork() if ASAN (GH-109835)

Skip test_is_alive_after_fork() of test_threading if Python is built
with Address Sanitizer (ASAN).
(cherry picked from commit bc06743533b5fea2d5ecdad6dd3caa372c67439f)

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/_test_multiprocessing.py
Lib/test/test_threading.py

index bf5d541af896cabb50117a79988c3f50f4fff9c5..ca8fcab09af6daa3df6e948c9bde2ce686a77996 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 9e4972ecb640df8e93504c942c23e04775836a2a..1b8019f0931f4f433796f7bf08c5a562305f98a9 100644 (file)
@@ -564,6 +564,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.