This repository was archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
71 lines (59 loc) · 1.79 KB
/
asan.yml
File metadata and controls
71 lines (59 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: test-asan
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test-asan:
name: test-asan (${{ matrix.build.ruby }})
runs-on: ubuntu-latest
env:
TARGET: x86_64-unknown-linux-gnu
strategy:
fail-fast: false
matrix:
build:
- ruby: '3.0'
check-ruby: ruby test/fixtures/all_nodes.rb
- ruby: '3.1'
check-ruby: ruby test/fixtures/all_nodes.rb
- ruby: '3.2'
check-ruby: ruby test/fixtures/all_nodes.rb
steps:
- name: checkout
uses: actions/checkout@v2
- name: install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.build.ruby }}
bundler-cache: true
- name: install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: make sure asan is available
run: |
# just to be sure, also print what executables are linked to
# when compiled with asan
echo 'int main() { return 0; }' > asan-test.c
gcc -fsanitize=address asan-test.c -o asan-test
ldd asan-test
- name: find libasan
run: echo "LIBASAN=$(gcc -print-file-name=libasan.so)" >> $GITHUB_ENV
- name: check our leaksan suppression list
env:
LSAN_OPTIONS: suppressions=LSan.supp
ASAN_OPTIONS: detect_leaks=1
run: LD_PRELOAD=$LIBASAN ${{ matrix.build.check-ruby }}
- name: compile .so with asan
env:
CFLAGS: "-fsanitize=address"
run: make dylib
- name: run tests
env:
LSAN_OPTIONS: suppressions=LSan.supp
ASAN_OPTIONS: detect_leaks=1
run: LD_PRELOAD=$LIBASAN make test