mirror of
https://github.com/python/cpython.git
synced 2025-08-14 22:01:08 +00:00
[3.12] gh-89363: Skip threading test_is_alive_after_fork() if ASAN (GH-109835) (#109855)
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 bc06743533
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
e25bc38ebb
commit
d09a3145b5
2 changed files with 5 additions and 1 deletions
|
@ -79,7 +79,7 @@ except ImportError:
|
||||||
|
|
||||||
|
|
||||||
if support.check_sanitizer(address=True):
|
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().
|
# work around a libasan race condition: dead lock in pthread_create().
|
||||||
raise unittest.SkipTest("libasan has a pthread_create() dead lock")
|
raise unittest.SkipTest("libasan has a pthread_create() dead lock")
|
||||||
|
|
||||||
|
|
|
@ -564,6 +564,10 @@ class ThreadTests(BaseTestCase):
|
||||||
self.assertEqual(err, b'')
|
self.assertEqual(err, b'')
|
||||||
|
|
||||||
@support.requires_fork()
|
@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):
|
def test_is_alive_after_fork(self):
|
||||||
# Try hard to trigger #18418: is_alive() could sometimes be True on
|
# Try hard to trigger #18418: is_alive() could sometimes be True on
|
||||||
# threads that vanished after a fork.
|
# threads that vanished after a fork.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue