mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
Run ThreadSanitizer on push to master (#575)
Fixes: https://github.com/quickjs-ng/quickjs/issues/557
This commit is contained in:
parent
4b1a244d3b
commit
ddabcf5e93
3 changed files with 45 additions and 0 deletions
31
.github/workflows/tsan.yml
vendored
Normal file
31
.github/workflows/tsan.yml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
name: tsan
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- '**'
|
||||
- '!.gitignore'
|
||||
- '!LICENSE'
|
||||
- '!README.md'
|
||||
- '!docs/**'
|
||||
- '!examples/**'
|
||||
- '.github/workflows/tsan.yml'
|
||||
- '.github/workflows/valgrind.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
- name: build
|
||||
run: |
|
||||
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONFIG_TSAN=ON
|
||||
cmake --build build -j`nproc`
|
||||
- name: test
|
||||
run: |
|
||||
./build/run-test262 -m -c test262.conf -c test262-fast.conf -a
|
1
.github/workflows/valgrind.yml
vendored
1
.github/workflows/valgrind.yml
vendored
|
@ -11,6 +11,7 @@ on:
|
|||
- '!README.md'
|
||||
- '!docs/**'
|
||||
- '!examples/**'
|
||||
- '.github/workflows/tsan.yml'
|
||||
- '.github/workflows/valgrind.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
|
|
|
@ -115,6 +115,7 @@ xoption(BUILD_CLI_WITH_MIMALLOC "Build the qjs executable with mimalloc" OFF)
|
|||
xoption(BUILD_CLI_WITH_STATIC_MIMALLOC "Build the qjs executable with mimalloc (statically linked)" OFF)
|
||||
xoption(CONFIG_ASAN "Enable AddressSanitizer (ASan)" OFF)
|
||||
xoption(CONFIG_MSAN "Enable MemorySanitizer (MSan)" OFF)
|
||||
xoption(CONFIG_TSAN "Enable ThreadSanitizer (TSan)" OFF)
|
||||
xoption(CONFIG_UBSAN "Enable UndefinedBehaviorSanitizer (UBSan)" OFF)
|
||||
|
||||
if(CONFIG_ASAN)
|
||||
|
@ -144,6 +145,18 @@ add_link_options(
|
|||
-fno-sanitize-recover=all
|
||||
-fno-omit-frame-pointer
|
||||
)
|
||||
elseif(CONFIG_TSAN)
|
||||
message(STATUS "Building with TSan")
|
||||
add_compile_options(
|
||||
-fsanitize=thread
|
||||
-fno-sanitize-recover=all
|
||||
-fno-omit-frame-pointer
|
||||
)
|
||||
add_link_options(
|
||||
-fsanitize=thread
|
||||
-fno-sanitize-recover=all
|
||||
-fno-omit-frame-pointer
|
||||
)
|
||||
elseif(CONFIG_UBSAN)
|
||||
message(STATUS "Building with UBSan")
|
||||
add_compile_definitions(
|
||||
|
|
Loading…
Reference in a new issue