-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
gh-117657: Enable TSAN check on macOS with free-threads build #120502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
eb3135b
b86782e
0fcc952
3136d75
3cf67e8
9301018
8bc1a79
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import re | ||
import sys | ||
import textwrap | ||
import unittest | ||
|
||
|
||
from test import support | ||
from test.support import import_helper, requires_subprocess | ||
from test.support.script_helper import assert_python_failure, assert_python_ok | ||
|
@@ -75,12 +75,20 @@ def check_malloc_without_gil(self, code): | |
def test_pymem_malloc_without_gil(self): | ||
# Debug hooks must raise an error if PyMem_Malloc() is called | ||
# without holding the GIL | ||
if support.check_sanitizer(thread=True) and sys.platform == 'darwin': | ||
# See: gh-120696 | ||
raise unittest.SkipTest("this test will hang on macOS with TSAN") | ||
Comment on lines
+78
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is hanging in faulthandler, that probably means the test is crashing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Faulthandler hanging is definitely not great, but even if faulthandler is fixed I expect there will still be a problem with this test. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These tests are just test the mallocator without the GIL, and intented to be crashed, so I think they are ok for now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, that makes sense -- I missed that. |
||
|
||
code = 'import _testcapi; _testcapi.pymem_malloc_without_gil()' | ||
self.check_malloc_without_gil(code) | ||
|
||
def test_pyobject_malloc_without_gil(self): | ||
# Debug hooks must raise an error if PyObject_Malloc() is called | ||
# without holding the GIL | ||
if support.check_sanitizer(thread=True) and sys.platform == 'darwin': | ||
# See: gh-120696 | ||
raise unittest.SkipTest("this test will hang on macOS with TSAN") | ||
|
||
code = 'import _testcapi; _testcapi.pyobject_malloc_without_gil()' | ||
self.check_malloc_without_gil(code) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid queuing up too many jobs for the limited number of macOS builders, we'd want to use
macos-14
for forks, but Cirrus for upstream builds.See elsewhere in this file for examples, also needs changes in the reusable workflow.