Skip to content

Commit 11936b3

Browse files
committed
gh-117657: Avoid sem_clockwait in TSAN
The `sem_clockwait` function is not currently instrumented, which leads to false positives.
1 parent 7dc745d commit 11936b3

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

Python/parking_lot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ _PySemaphore_PlatformWait(_PySemaphore *sema, PyTime_t timeout)
119119
if (timeout >= 0) {
120120
struct timespec ts;
121121

122-
#if defined(CLOCK_MONOTONIC) && defined(HAVE_SEM_CLOCKWAIT)
122+
#if defined(CLOCK_MONOTONIC) && defined(HAVE_SEM_CLOCKWAIT) && !defined(_Py_THREAD_SANITIZER)
123123
PyTime_t now;
124124
// silently ignore error: cannot report error to the caller
125125
(void)PyTime_MonotonicRaw(&now);

Tools/tsan/suppressions_free_threading.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@ race:set_allocator_unlocked
1515
# These entries are for warnings that trigger in a library function, as called
1616
# by a CPython function.
1717

18-
# https://gist.github.com/swtaarrs/9d41251e603fa6dedd604191a6da820d
19-
race:park_detached_threads
2018
# https://gist.github.com/swtaarrs/8e0e365e1d9cecece3269a2fb2f2b8b8
2119
race:sock_recv_impl
2220
# https://gist.github.com/swtaarrs/08dfe7883b4c975c31ecb39388987a67
2321
race:free_threadstate
24-
# https://gist.github.com/swtaarrs/cd6aec2006e0c1b561b68d65e9f1a872
25-
race:_PyParkingLot_Park
2622

2723

2824
# These warnings trigger directly in a CPython function.
@@ -33,8 +29,6 @@ race_top:_mi_heap_delayed_free_partial
3329
race_top:_PyEval_EvalFrameDefault
3430
race_top:_PyImport_AcquireLock
3531
race_top:_PyImport_ReleaseLock
36-
# https://gist.github.com/mpage/0a24eb2dd458441ededb498e9b0e5de8
37-
race_top:_PyParkingLot_Park
3832
race_top:_PyType_HasFeature
3933
race_top:assign_version_tag
4034
race_top:insertdict
@@ -47,8 +41,6 @@ race_top:set_contains_key
4741
# https://gist.github.com/colesbury/d13d033f413b4ad07929d044bed86c35
4842
race_top:set_discard_entry
4943
race_top:set_inheritable
50-
race_top:start_the_world
51-
race_top:tstate_set_detached
5244
race_top:unicode_hash
5345
race_top:Py_SET_TYPE
5446
race_top:_PyDict_CheckConsistency
@@ -66,7 +58,6 @@ race_top:make_pending_calls
6658
race_top:set_add_entry
6759
race_top:should_intern_string
6860
race_top:_PyEval_IsGILEnabled
69-
race_top:llist_insert_tail
7061
race_top:_Py_slot_tp_getattr_hook
7162
race_top:add_threadstate
7263
race_top:dump_traceback

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy