]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-89363: Skip threading test_is_alive_after_fork() if ASAN (GH-109835) (...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 25 Sep 2023 16:29:56 +0000 (09:29 -0700)
committerGitHub <noreply@github.com>
Mon, 25 Sep 2023 16:29:56 +0000 (16:29 +0000)
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 e83c4416cb05a3dbc56969a965abb3e987528a8a..c3ba1f686b0021200930e3173887153a4000e775 100644 (file)
@@ -78,7 +78,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 9c6561c099f57082d193f9c048fc2bb90ebcba3a..4688648aa35ea82510ea9372e3255f702e83d7e8 100644 (file)
@@ -589,6 +589,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.