Skip to content

Commit de8fd66

Browse files
committed
Enable OS provider with tsan
1 parent 48b2b4f commit de8fd66

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/basic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
compiler: {c: clang, cxx: clang++}
125125
pool_tracking: 'ON'
126126
shared_library: 'OFF'
127-
# os_provider: 'ON' # TODO: fix TSAN issues and enable os_provider here
127+
os_provider: 'ON'
128128
sanitizers: {asan: OFF, ubsan: OFF, tsan: ON}
129129
- os: 'ubuntu-22.04'
130130
build_type: Debug
@@ -138,7 +138,7 @@ jobs:
138138
compiler: {c: gcc, cxx: g++}
139139
pool_tracking: 'ON'
140140
shared_library: 'OFF'
141-
# os_provider: 'ON' # TODO: fix TSAN issues and enable os_provider here
141+
os_provider: 'ON'
142142
sanitizers: {asan: OFF, ubsan: OFF, tsan: ON}
143143
runs-on: ${{matrix.os}}
144144

src/utils/utils_sanitizers.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
*
88
*/
99

10+
#if defined(__has_feature)
11+
#if __has_feature(thread_sanitizer)
12+
#ifndef __SANITIZE_THREAD__
13+
#define __SANITIZE_THREAD__ 1
14+
#endif
15+
#endif
16+
#endif
17+
1018
#if __SANITIZE_THREAD__
1119
#include <sanitizer/tsan_interface.h>
1220
#endif

0 commit comments

Comments
 (0)