diff options
author | Antoine Pitrou <antoine@python.org> | 2024-03-17 08:47:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-17 08:47:14 (GMT) |
commit | b8d808ddd77f84de9f93adcc2aede2879eb5241e (patch) | |
tree | f30c880fb25055f91984f7d9a935303c68543981 /Modules/_testinternalcapi.c | |
parent | 649857a1574a02235ccfac9e2ac1c12914cf8fe0 (diff) | |
download | cpython-b8d808ddd77f84de9f93adcc2aede2879eb5241e.zip cpython-b8d808ddd77f84de9f93adcc2aede2879eb5241e.tar.gz cpython-b8d808ddd77f84de9f93adcc2aede2879eb5241e.tar.bz2 |
GH-112536: Add more TSan tests (#116911)
These may all exercise some non-trivial aspects of thread synchronization.
Diffstat (limited to 'Modules/_testinternalcapi.c')
-rw-r--r-- | Modules/_testinternalcapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index b3076a8..1c10dd0 100644 --- a/Modules/_testinternalcapi.c +++ b/Modules/_testinternalcapi.c @@ -1287,8 +1287,8 @@ check_pyobject_forbidden_bytes_is_freed(PyObject *self, static PyObject * check_pyobject_freed_is_freed(PyObject *self, PyObject *Py_UNUSED(args)) { - /* This test would fail if run with the address sanitizer */ -#ifdef _Py_ADDRESS_SANITIZER + /* ASan or TSan would report an use-after-free error */ +#if defined(_Py_ADDRESS_SANITIZER) || defined(_Py_THREAD_SANITIZER) Py_RETURN_NONE; #else PyObject *op = PyObject_CallNoArgs((PyObject *)&PyBaseObject_Type); |