File tree 3 files changed +45
-0
lines changed
3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : tsan
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ paths :
8
+ - ' **'
9
+ - ' !.gitignore'
10
+ - ' !LICENSE'
11
+ - ' !README.md'
12
+ - ' !docs/**'
13
+ - ' !examples/**'
14
+ - ' .github/workflows/tsan.yml'
15
+ - ' .github/workflows/valgrind.yml'
16
+ workflow_dispatch :
17
+
18
+ jobs :
19
+ linux :
20
+ runs-on : ubuntu-latest
21
+ steps :
22
+ - uses : actions/checkout@v4
23
+ with :
24
+ submodules : true
25
+ - name : build
26
+ run : |
27
+ cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONFIG_TSAN=ON
28
+ cmake --build build -j`nproc`
29
+ - name : test
30
+ run : |
31
+ ./build/run-test262 -m -c test262.conf -c test262-fast.conf -a
Original file line number Diff line number Diff line change 11
11
- ' !README.md'
12
12
- ' !docs/**'
13
13
- ' !examples/**'
14
+ - ' .github/workflows/tsan.yml'
14
15
- ' .github/workflows/valgrind.yml'
15
16
workflow_dispatch :
16
17
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ xoption(BUILD_CLI_WITH_MIMALLOC "Build the qjs executable with mimalloc" OFF)
115
115
xoption(BUILD_CLI_WITH_STATIC_MIMALLOC "Build the qjs executable with mimalloc (statically linked)" OFF )
116
116
xoption(CONFIG_ASAN "Enable AddressSanitizer (ASan)" OFF )
117
117
xoption(CONFIG_MSAN "Enable MemorySanitizer (MSan)" OFF )
118
+ xoption(CONFIG_TSAN "Enable ThreadSanitizer (TSan)" OFF )
118
119
xoption(CONFIG_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan)" OFF )
119
120
120
121
if (CONFIG_ASAN)
@@ -144,6 +145,18 @@ add_link_options(
144
145
-fno-sanitize-recover=all
145
146
-fno-omit-frame-pointer
146
147
)
148
+ elseif (CONFIG_TSAN)
149
+ message (STATUS "Building with TSan" )
150
+ add_compile_options (
151
+ -fsanitize=thread
152
+ -fno-sanitize-recover=all
153
+ -fno-omit-frame-pointer
154
+ )
155
+ add_link_options (
156
+ -fsanitize=thread
157
+ -fno-sanitize-recover=all
158
+ -fno-omit-frame-pointer
159
+ )
147
160
elseif (CONFIG_UBSAN)
148
161
message (STATUS "Building with UBSan" )
149
162
add_compile_definitions (
You can’t perform that action at this time.
0 commit comments