Skip to content

Commit 671dedc

Browse files
authored
ci: enable asan and ubs (#26)
Signed-off-by: Tony Gorez <[email protected]>
1 parent 04ebfbe commit 671dedc

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ jobs:
6060
type: static
6161
options: -DINCLUDEJS_UNDEFINED_SANITIZER:BOOL=ON
6262
backend: JavaScriptCore
63+
- os: macos-latest
64+
cc: clang
65+
cxx: clang++
66+
type: static
67+
options: -DINCLUDEJS_ADDRESS_SANITIZER:BOOL=ON
68+
backend: JavaScriptCore
69+
- os: macos-latest
70+
cc: clang
71+
cxx: clang++
72+
type: static
73+
options: -DINCLUDEJS_UNDEFINED_SANITIZER:BOOL=ON
74+
backend: JavaScriptCore
6375

6476
runs-on: ${{ matrix.platform.os }}
6577
env:

cmake/FindGoogleTest.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ if(NOT GoogleTest_FOUND)
55
include(GoogleTest)
66
set(GoogleTest_FOUND ON)
77
endif()
8+
9+
# We want to disable the unsigned shift base sanitizer for gtest
10+
# because it triggers on the gtest code.
11+
if(INCLUDEJS_UNDEFINED_SANITIZER)
12+
target_compile_options(gtest PRIVATE "-fno-sanitize=unsigned-shift-base")
13+
endif()

0 commit comments

Comments
 (0)