summaryrefslogtreecommitdiffstats
path: root/Tools/tsan
diff options
context:
space:
mode:
authormpage <mpage@meta.com>2024-04-15 16:08:25 (GMT)
committerGitHub <noreply@github.com>2024-04-15 16:08:25 (GMT)
commit47832067da54385c6cd5ad0f4f9d7f7dc69ebdb2 (patch)
tree7a91a554840e1b2a7189b984dddc3701ac502528 /Tools/tsan
parent0823f4361850145152a94e9086bede6a000d8a4a (diff)
downloadcpython-47832067da54385c6cd5ad0f4f9d7f7dc69ebdb2.zip
cpython-47832067da54385c6cd5ad0f4f9d7f7dc69ebdb2.tar.gz
cpython-47832067da54385c6cd5ad0f4f9d7f7dc69ebdb2.tar.bz2
gh-117657: Add TSAN suppressions for the free-threaded build (#117736)
Additionally, reduce the iterations for a few weakref tests that would otherwise take a prohibitively long amount of time (> 1 hour) when TSAN is enabled and the GIL is disabled.
Diffstat (limited to 'Tools/tsan')
-rw-r--r--Tools/tsan/suppressions_free_threading.txt51
-rw-r--r--Tools/tsan/supressions.txt5
2 files changed, 53 insertions, 3 deletions
diff --git a/Tools/tsan/suppressions_free_threading.txt b/Tools/tsan/suppressions_free_threading.txt
new file mode 100644
index 0000000..889b62e
--- /dev/null
+++ b/Tools/tsan/suppressions_free_threading.txt
@@ -0,0 +1,51 @@
+# This file contains suppressions for the free-threaded build. It contains the
+# suppressions for the default build and additional suppressions needed only in
+# the free-threaded build.
+#
+# reference: https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions
+
+## Default build suppresssions
+
+race:get_allocator_unlocked
+race:set_allocator_unlocked
+
+## Free-threaded suppressions
+
+race:_add_to_weak_set
+race:_in_weak_set
+race:_mi_heap_delayed_free_partial
+race:_Py_IsImmortal
+race:_Py_IsOwnedByCurrentThread
+race:_PyEval_EvalFrameDefault
+race:_PyFunction_SetVersion
+race:_PyImport_AcquireLock
+race:_PyImport_ReleaseLock
+race:_PyInterpreterState_SetNotRunningMain
+race:_PyInterpreterState_IsRunningMain
+race:_PyObject_GC_IS_SHARED
+race:_PyObject_GC_SET_SHARED
+race:_PyObject_GC_TRACK
+race:_PyType_HasFeature
+race:_PyType_Lookup
+race:assign_version_tag
+race:compare_unicode_unicode
+race:delitem_common
+race:dictkeys_decref
+race:dictkeys_incref
+race:dictresize
+race:gc_collect_main
+race:gc_restore_tid
+race:initialize_new_array
+race:insertdict
+race:lookup_tp_dict
+race:mi_heap_visit_pages
+race:PyMember_GetOne
+race:PyMember_SetOne
+race:new_reference
+race:set_contains_key
+race:set_inheritable
+race:start_the_world
+race:tstate_set_detached
+race:unicode_hash
+race:update_cache
+race:update_cache_gil_disabled
diff --git a/Tools/tsan/supressions.txt b/Tools/tsan/supressions.txt
index 448dfac..c778c79 100644
--- a/Tools/tsan/supressions.txt
+++ b/Tools/tsan/supressions.txt
@@ -1,5 +1,4 @@
-## reference: https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions
+# This file contains suppressions for the default (with GIL) build.
+# reference: https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions
race:get_allocator_unlocked
race:set_allocator_unlocked
-race:mi_heap_visit_pages
-race:_mi_heap_delayed_free_partial