mirror of
https://github.com/SOCI/soci.git
synced 2026-02-14 18:28:40 -06:00
Suppress reports about memory leaks in PostgreSQL ODBC test
Unfortunately we don't get any information about these leaks, the entire
report looks like this:
==6706==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 24 byte(s) in 1 object(s) allocated from:
#0 0x7f6473f80602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
#1 0x7f646f89ba82 (/usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so+0x1ba82)
Indirect leak of 25 byte(s) in 1 object(s) allocated from:
#0 0x7f6473f80602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
#1 0x7f646f89ba9a (/usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so+0x1ba9a)
SUMMARY: AddressSanitizer: 49 byte(s) leaked in 2 allocation(s).
So we have no choice but to suppress all leaks from psqlodbca.so to let
the tests to pass on Travis CI.
This commit is contained in:
6
scripts/suppress_odbc.txt
Normal file
6
scripts/suppress_odbc.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
# This is a suppression file for LeakSanitizer when running ODBC tests.
|
||||
|
||||
# Unfortunately there is a leak from psqlodbca.so for which ASAN doesn't show
|
||||
# any stack at all, so we have no choice but to suppress all leaks from this
|
||||
# library, even though it could easily hide real problems.
|
||||
leak:psqlodbca.so
|
||||
@@ -31,4 +31,4 @@ run_make
|
||||
|
||||
# Exclude the tests which can't be run due to the absence of ODBC drivers (MS
|
||||
# SQL and MySQL).
|
||||
run_test -E 'soci_odbc_test_m.sql'
|
||||
LSAN_OPTIONS=suppressions=${TRAVIS_BUILD_DIR}/scripts/suppress_odbc.txt run_test -E 'soci_odbc_test_m.sql'
|
||||
|
||||
Reference in New Issue
Block a user