File tree Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,16 @@ build:clang-asan-strict --config=clang-asan
30
30
build:clang-asan-strict --copt -fsanitize=integer
31
31
build:clang-asan-strict --linkopt -fsanitize=integer
32
32
33
+ # Use Clang compiler with Thread Sanitizer.
34
+ build:clang-tsan --config=clang
35
+ build:clang-tsan --copt -DTHREAD_SANITIZER=1
36
+ build:clang-tsan --copt -O1
37
+ build:clang-tsan --copt -fno-omit-frame-pointer
38
+ build:clang-tsan --copt -fno-optimize-sibling-calls
39
+ build:clang-tsan --copt -fsanitize=thread
40
+ build:clang-tsan --linkopt -fsanitize=thread
41
+ build:clang-tsan --linkopt -fuse-ld=lld
42
+
33
43
# Use GCC compiler.
34
44
build:gcc --action_env=BAZEL_COMPILER=gcc
35
45
build:gcc --action_env=CC=gcc
Original file line number Diff line number Diff line change @@ -102,6 +102,12 @@ jobs:
102
102
arch : x86_64
103
103
action : test
104
104
flags : --config=clang-asan-strict --define=crypto=system
105
+ - name : ' NullVM on Linux/x86_64 with TSan'
106
+ engine : ' null'
107
+ os : ubuntu-20.04
108
+ arch : x86_64
109
+ action : test
110
+ flags : --config=clang-tsan
105
111
- name : ' NullVM on Windows/x86_64'
106
112
engine : ' null'
107
113
os : windows-2019
@@ -123,6 +129,14 @@ jobs:
123
129
action : test
124
130
flags : --config=clang-asan
125
131
cache : true
132
+ - name : ' V8 on Linux/x86_64 with TSan'
133
+ engine : ' v8'
134
+ repo : ' v8'
135
+ os : ubuntu-20.04
136
+ arch : x86_64
137
+ action : test
138
+ flags : --config=clang-tsan
139
+ cache : true
126
140
- name : ' V8 on Linux/aarch64'
127
141
engine : ' v8'
128
142
repo : ' v8'
Original file line number Diff line number Diff line change @@ -128,7 +128,14 @@ TEST_P(TestVM, CloneUntilOutOfMemory) {
128
128
// Prevent clone from droping out of scope and freeing memory.
129
129
clones.push_back (std::move (clone));
130
130
}
131
- EXPECT_GE (clones.size (), 1000 );
131
+
132
+ size_t min_clones = 1000 ;
133
+ #if defined(__has_feature)
134
+ #if __has_feature(thread_sanitizer)
135
+ min_clones = 100 ;
136
+ #endif
137
+ #endif
138
+ EXPECT_GE (clones.size (), min_clones);
132
139
}
133
140
134
141
#endif
You can’t perform that action at this time.
0 commit comments