Skip to content

Commit 40d4620

Browse files
committed
chore(ci): ignore leaks when copying a ClosureScope
1 parent 5aff6da commit 40d4620

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,14 +461,16 @@ jobs:
461461

462462
- name: Run tests
463463
run: |
464+
# we are in /home/runner/work/Ark/Ark/build/
464465
export ASAN_OPTIONS=detect_odr_violation=0
466+
export LSAN_OPTIONS=suppressions=../lsan-suppressions.txt
465467
./build/unittests
466468
467469
- name: Gather coverage
468470
run: cmake --build build --target coverage
469471

470472
- name: Coveralls
471-
uses: coverallsapp/github-action@master
473+
uses: coverallsapp/github-action@main
472474
with:
473475
path-to-lcov: build/coverage.info
474476
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -503,6 +505,7 @@ jobs:
503505
shell: bash
504506
run: |
505507
export ASAN_OPTIONS=detect_odr_violation=0
508+
export LSAN_OPTIONS=suppressions=lsan-suppressions.txt
506509
./unittests
507510
508511
- uses: actions/setup-python@v6
@@ -515,6 +518,7 @@ jobs:
515518
shell: bash
516519
run: |
517520
export ASAN_OPTIONS=detect_odr_violation=0
521+
export LSAN_OPTIONS=suppressions=lsan-suppressions.txt
518522
chmod u+x ./lib/modules/.github/run-tests
519523
(./lib/modules/.github/run-tests src)
520524
@@ -695,4 +699,6 @@ jobs:
695699
--verbose -s \
696700
--demangle=yes \
697701
--error-exitcode=1 \
702+
--suppressions=valgrind-suppressions.txt \
703+
--gen-suppressions=all \
698704
build/arkscript -L ./lib tests/unittests/resources/LangSuite/unittests.ark valgrind

lsan-suppressions.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# ArkScript closures that contain references to themselves are seen as leaky
2+
leak:Ark::internal::ClosureScope::ClosureScope(Ark::internal::ClosureScope const&)

valgrind-suppressions.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
ignore_closure_leak
3+
Memcheck:Leak
4+
...
5+
fun:_ZN3Ark8internal7ClosureC1ERKNS0_12ClosureScopeEt
6+
}
7+
{
8+
ignore_closure_leak_2
9+
Memcheck:Leak
10+
...
11+
fun:construct<Ark::internal::ClosureScope, const Ark::internal::ClosureScope &>
12+
}

0 commit comments

Comments
 (0)