Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ build:clang-asan-strict --config=clang-asan
build:clang-asan-strict --copt -fsanitize=integer
build:clang-asan-strict --linkopt -fsanitize=integer

# Use Clang compiler with Thread Sanitizer.
build:clang-tsan --config=clang
build:clang-tsan --copt -DTHREAD_SANITIZER=1
build:clang-tsan --copt -O1
build:clang-tsan --copt -fno-omit-frame-pointer
build:clang-tsan --copt -fno-optimize-sibling-calls
build:clang-tsan --copt -fsanitize=thread
build:clang-tsan --linkopt -fsanitize=thread
build:clang-tsan --linkopt -fuse-ld=lld

# Use GCC compiler.
build:gcc --action_env=BAZEL_COMPILER=gcc
build:gcc --action_env=CC=gcc
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ jobs:
arch: x86_64
action: test
flags: --config=clang-asan-strict --define=crypto=system
- name: 'NullVM on Linux/x86_64 with TSan'
engine: 'null'
os: ubuntu-20.04
arch: x86_64
action: test
flags: --config=clang-tsan
- name: 'NullVM on Windows/x86_64'
engine: 'null'
os: windows-2019
Expand All @@ -123,6 +129,14 @@ jobs:
action: test
flags: --config=clang-asan
cache: true
- name: 'V8 on Linux/x86_64 with TSan'
engine: 'v8'
repo: 'v8'
os: ubuntu-20.04
arch: x86_64
action: test
flags: --config=clang-tsan
cache: true
- name: 'V8 on Linux/aarch64'
engine: 'v8'
repo: 'v8'
Expand Down
9 changes: 8 additions & 1 deletion test/runtime_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,14 @@ TEST_P(TestVM, CloneUntilOutOfMemory) {
// Prevent clone from droping out of scope and freeing memory.
clones.push_back(std::move(clone));
}
EXPECT_GE(clones.size(), 1000);

size_t min_clones = 1000;
#if defined(__has_feature)
#if __has_feature(thread_sanitizer)
min_clones = 100;
#endif
#endif
EXPECT_GE(clones.size(), min_clones);
}

#endif
Expand Down