From 22a8efa7408e00552c9845420caf925685dde92f Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:29:56 -0700 Subject: [PATCH] [3.11] gh-89363: Skip threading test_is_alive_after_fork() if ASAN (GH-109835) (#109856) 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 --- Lib/test/_test_multiprocessing.py | 2 +- Lib/test/test_threading.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index e83c4416cb05..c3ba1f686b00 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -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") diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 9c6561c099f5..4688648aa35e 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -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. -- 2.47.3