[3.12] gh-112536: Add --tsan test for reasonable TSAN execution times. (gh-116601) (#116929)

(cherry picked from commit ebf29b3)

Co-authored-by: Donghee Na <donghee.na@python.org>
This commit is contained in:
Antoine Pitrou 2024-03-18 10:22:19 +01:00 committed by GitHub
parent 2ac1b48a04
commit fcb230180f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 64 additions and 4 deletions

View file

@ -580,8 +580,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);