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
22 changes: 21 additions & 1 deletion .github/generate-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ def generate_name(compiler_family, entry):
macos_ver = runner.replace("macos-", "macOS ")
modifiers.append(macos_ver)

if entry.get("asan") and entry.get("ubsan"):
if entry.get("tsan"):
modifiers.append("tsan")
elif entry.get("asan") and entry.get("ubsan"):
modifiers.append("asan+ubsan")
elif entry.get("asan"):
modifiers.append("asan")
Expand Down Expand Up @@ -169,6 +171,20 @@ def generate_sanitizer_variant(compiler_family, spec):
return make_entry(compiler_family, spec, **overrides)


def generate_tsan_variant(compiler_family, spec):
"""Generate TSan variant for the latest compiler in a family (Linux only)."""
overrides = {
"tsan": True,
"build-type": "RelWithDebInfo",
"shared": True,
}

if compiler_family == "clang":
overrides["shared"] = False

return make_entry(compiler_family, spec, **overrides)


def generate_coverage_variant(compiler_family, spec):
"""Generate coverage variant.

Expand Down Expand Up @@ -245,6 +261,10 @@ def main():
if family != "mingw":
matrix.append(generate_sanitizer_variant(family, spec))

# TSan is incompatible with ASan; separate variant for Linux
if family in ("gcc", "clang"):
matrix.append(generate_tsan_variant(family, spec))

if family == "clang":
matrix.append(generate_x86_variant(family, spec))

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@ jobs:
if: ${{ !matrix.coverage }}
env:
ASAN_OPTIONS: ${{ ((matrix.compiler == 'apple-clang' || matrix.compiler == 'clang') && 'detect_invalid_pointer_pairs=0:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1') || 'detect_invalid_pointer_pairs=2:strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1' }}
TSAN_OPTIONS: ${{ matrix.tsan && 'halt_on_error=1:second_deadlock_stack=1' || '' }}
with:
source-dir: boost-root
modules: corosio
Expand All @@ -471,6 +472,7 @@ jobs:
address-model: ${{ (matrix.x86 && '32') || '64' }}
asan: ${{ matrix.asan }}
ubsan: ${{ matrix.ubsan }}
tsan: ${{ matrix.tsan }}
shared: ${{ matrix.shared }}
rtti: on
cxxflags: ${{ matrix.cxxflags }} ${{ (matrix.asan && matrix.compiler != 'msvc' && matrix.compiler != 'clang-cl' && '-fsanitize-address-use-after-scope -fsanitize=pointer-subtract') || '' }}
Expand Down
Loading