mirror of
https://github.com/python/cpython.git
synced 2026-05-07 21:20:55 -04:00
[3.13] gh-117657: Avoid sem_clockwait in TSAN (GH-119915) (#119992)
The `sem_clockwait` function is not currently instrumented, which leads
to false positives.
(cherry picked from commit 41c1cefbae)
Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
committed by
GitHub
parent
6b10467fbc
commit
ca37034baa
@@ -119,7 +119,7 @@ _PySemaphore_PlatformWait(_PySemaphore *sema, PyTime_t timeout)
|
||||
if (timeout >= 0) {
|
||||
struct timespec ts;
|
||||
|
||||
#if defined(CLOCK_MONOTONIC) && defined(HAVE_SEM_CLOCKWAIT)
|
||||
#if defined(CLOCK_MONOTONIC) && defined(HAVE_SEM_CLOCKWAIT) && !defined(_Py_THREAD_SANITIZER)
|
||||
PyTime_t now;
|
||||
// silently ignore error: cannot report error to the caller
|
||||
(void)PyTime_MonotonicRaw(&now);
|
||||
|
||||
Reference in New Issue
Block a user