Skip to content

Commit 19d66dd

Browse files
committed
Add lsan.supp and fix suppressions file path
LSAN_OPTIONS referenced a relative 'lsan.supp' path but CTest runs from the build directory. Use an absolute path derived from the source/workspace root so the file is always found. Also adds the lsan.supp suppressions file with initial rules for libfbclient, libodbc, and libodbcinst.
1 parent b7d628f commit 19d66dd

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
env:
5353
API_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5454
ASAN_OPTIONS: ${{ matrix.sanitizer == 'Asan' && 'detect_leaks=1:halt_on_error=1:print_stats=1' || '' }}
55-
LSAN_OPTIONS: ${{ matrix.sanitizer == 'Asan' && 'suppressions=lsan.supp' || '' }}
55+
LSAN_OPTIONS: ${{ matrix.sanitizer == 'Asan' && format('suppressions={0}/lsan.supp', github.workspace) || '' }}
5656
run: Invoke-Build test -Configuration ${{ matrix.config }} -Sanitizer ${{ matrix.sanitizer }} -File ./firebird-odbc-driver.build.ps1
5757

5858
- name: Upload driver (Windows)

firebird-odbc-driver.build.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ task test build, build-test-databases, install, {
142142
# Set sanitizer runtime options
143143
if ($Sanitizer -eq 'Asan' -and -not $IsWindowsOS) {
144144
$env:ASAN_OPTIONS = 'detect_leaks=1:halt_on_error=1:print_stats=1'
145-
$env:LSAN_OPTIONS = 'suppressions=lsan.supp'
145+
$lsanSupp = Join-Path $BuildRoot 'lsan.supp'
146+
$env:LSAN_OPTIONS = "suppressions=$lsanSupp"
146147
print Cyan "ASAN_OPTIONS=$env:ASAN_OPTIONS"
147148
}
148149

lsan.supp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# LeakSanitizer suppressions for Firebird ODBC Driver test suite
2+
#
3+
# This file suppresses known leak reports from third-party libraries
4+
# (Firebird client, unixODBC, system allocators, etc.).
5+
# Populate as false positives are discovered during ASAN/LSAN runs.
6+
#
7+
# Usage:
8+
# export LSAN_OPTIONS="suppressions=lsan.supp"
9+
10+
leak:libfbclient
11+
leak:libodbc
12+
leak:libodbcinst

0 commit comments

Comments
 (0)