mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.11] gh-110656: Fix logging test_post_fork_child_no_deadlock() if ASAN (GH-110657) (#110665)
gh-110656: Fix logging test_post_fork_child_no_deadlock() if ASAN (GH-110657)
Skip test_post_fork_child_no_deadlock() if Python is built with ASAN.
Add support.HAVE_ASAN_FORK_BUG.
(cherry picked from commit f901f56313
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
46347d3caf
commit
7984dc28b3
4 changed files with 15 additions and 10 deletions
|
@ -37,19 +37,12 @@ platforms_to_skip = ('netbsd5', 'hp-ux11')
|
|||
Py_DEBUG = hasattr(sys, 'gettotalrefcount')
|
||||
|
||||
|
||||
# gh-89363: Skip fork() test if Python is built with Address Sanitizer (ASAN)
|
||||
# to work around a libasan race condition, dead lock in pthread_create().
|
||||
skip_if_asan_fork = support.skip_if_sanitizer(
|
||||
"libasan has a pthread_create() dead lock",
|
||||
address=True)
|
||||
|
||||
|
||||
def skip_unless_reliable_fork(test):
|
||||
if not support.has_fork_support:
|
||||
return unittest.skip("requires working os.fork()")(test)
|
||||
if sys.platform in platforms_to_skip:
|
||||
return unittest.skip("due to known OS bug related to thread+fork")(test)
|
||||
if support.check_sanitizer(address=True):
|
||||
if support.HAVE_ASAN_FORK_BUG:
|
||||
return unittest.skip("libasan has a pthread_create() dead lock related to thread+fork")(test)
|
||||
return test
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue