postgresql-interfaces/psqlodbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: progmachine (@progmachine) <[email protected]>
To: postgresql-interfaces/psqlodbc <[email protected]>
Subject: Re: [postgresql-interfaces/psqlodbc] issue #8: Memory leaks detected in psqlodbc library
Date: Wed, 15 May 2024 09:19:02 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
Managed to run tests with AddressSanitizer+LeakSanitizer. It appears that on Ubuntu 22.04 with GCC 12 ASAN+LeakSan is incompatible with new kernel ASLR randomization. [Reducing randomization entropy helped](https://github.com/actions/runner-images/issues/9524#issuecomment-2002517100)
**These are complete leaks report from tests + heap buffer overflow.**
```
connect .................... ok
stmthandles ................ ok
select ..................... ok
update ..................... ok
commands ................... ok
multistmt .................. ok
getresult .................. ok
colattribute ............... ok
result-conversions ......... ok
prepare .................... ok
premature ..................
=================================================================
==52495==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1280 byte(s) in 4 object(s) allocated from:
#0 0x7f75336bf91f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7f7532a96990 in QR_Constructor /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/qresult.c:184
#2 0x7f7532abe654 in ParseAndDescribeWithLibpq /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:2953
#3 0x7f7532a7b70a in desc_params_and_sync /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2839
#4 0x7f7532a7b932 in prepareParameters /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2899
#5 0x7f7532ab7e46 in SC_describe /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:1160
#6 0x7f7532a9b9f4 in SC_describe_ok /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:95
#7 0x7f7532a9bf27 in PGAPI_NumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:188
#8 0x7f7532ac8d28 in SQLNumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:552
#9 0x7f7533cee813 in SQLNumResultCols (/lib/x86_64-linux-gnu/libodbc.so.2+0x1d813)
Direct leak of 640 byte(s) in 2 object(s) allocated from:
#0 0x7f75336bf91f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7f7532a96990 in QR_Constructor /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/qresult.c:184
#2 0x7f7532abe654 in ParseAndDescribeWithLibpq /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:2953
#3 0x7f7532a7b70a in desc_params_and_sync /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2839
#4 0x7f7532a7b932 in prepareParameters /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2899
#5 0x7f7532ab7e64 in SC_describe /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:1164
#6 0x7f7532a9b9f4 in SC_describe_ok /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:95
#7 0x7f7532a9bf27 in PGAPI_NumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:188
#8 0x7f7532ac8d28 in SQLNumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:552
#9 0x7f7533cee813 in SQLNumResultCols (/lib/x86_64-linux-gnu/libodbc.so.2+0x1d813)
Indirect leak of 192 byte(s) in 2 object(s) allocated from:
#0 0x7f75336bf2e7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
#1 0x7f7532a6bb5b in CI_set_num_fields /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/columninfo.c:146
#2 0x7f7532a6b828 in CI_read_fields_from_pgres /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/columninfo.c:74
#3 0x7f7532abecf1 in ParseAndDescribeWithLibpq /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:3038
#4 0x7f7532a7b70a in desc_params_and_sync /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2839
#5 0x7f7532a7b932 in prepareParameters /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2899
#6 0x7f7532ab7e64 in SC_describe /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:1164
#7 0x7f7532a9b9f4 in SC_describe_ok /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:95
#8 0x7f7532a9bf27 in PGAPI_NumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:188
#9 0x7f7532ac8d28 in SQLNumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:552
#10 0x7f7533cee813 in SQLNumResultCols (/lib/x86_64-linux-gnu/libodbc.so.2+0x1d813)
Indirect leak of 128 byte(s) in 4 object(s) allocated from:
#0 0x7f75336bf2e7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
#1 0x7f7532a6bb5b in CI_set_num_fields /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/columninfo.c:146
#2 0x7f7532a6b828 in CI_read_fields_from_pgres /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/columninfo.c:74
#3 0x7f7532abecf1 in ParseAndDescribeWithLibpq /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:3038
#4 0x7f7532a7b70a in desc_params_and_sync /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2839
#5 0x7f7532a7b932 in prepareParameters /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2899
#6 0x7f7532ab7e46 in SC_describe /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:1160
#7 0x7f7532a9b9f4 in SC_describe_ok /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:95
#8 0x7f7532a9bf27 in PGAPI_NumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:188
#9 0x7f7532ac8d28 in SQLNumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:552
#10 0x7f7533cee813 in SQLNumResultCols (/lib/x86_64-linux-gnu/libodbc.so.2+0x1d813)
Indirect leak of 64 byte(s) in 4 object(s) allocated from:
#0 0x7f75336bf91f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7f7532a6b715 in CI_Constructor /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/columninfo.c:30
#2 0x7f7532a969c5 in QR_Constructor /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/qresult.c:195
#3 0x7f7532abe654 in ParseAndDescribeWithLibpq /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:2953
#4 0x7f7532a7b70a in desc_params_and_sync /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2839
#5 0x7f7532a7b932 in prepareParameters /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2899
#6 0x7f7532ab7e46 in SC_describe /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:1160
#7 0x7f7532a9b9f4 in SC_describe_ok /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:95
#8 0x7f7532a9bf27 in PGAPI_NumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:188
#9 0x7f7532ac8d28 in SQLNumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:552
#10 0x7f7533cee813 in SQLNumResultCols (/lib/x86_64-linux-gnu/libodbc.so.2+0x1d813)
Indirect leak of 54 byte(s) in 6 object(s) allocated from:
#0 0x7f7533673668 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:439
#1 0x7f7532a6bbcd in CI_set_field_info /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/columninfo.c:160
#2 0x7f7532a6ba2b in CI_read_fields_from_pgres /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/columninfo.c:108
#3 0x7f7532abecf1 in ParseAndDescribeWithLibpq /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:3038
#4 0x7f7532a7b70a in desc_params_and_sync /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2839
#5 0x7f7532a7b932 in prepareParameters /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2899
#6 0x7f7532ab7e64 in SC_describe /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:1164
#7 0x7f7532a9b9f4 in SC_describe_ok /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:95
#8 0x7f7532a9bf27 in PGAPI_NumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:188
#9 0x7f7532ac8d28 in SQLNumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:552
#10 0x7f7533cee813 in SQLNumResultCols (/lib/x86_64-linux-gnu/libodbc.so.2+0x1d813)
Indirect leak of 32 byte(s) in 2 object(s) allocated from:
#0 0x7f75336bf91f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7f7532a6b715 in CI_Constructor /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/columninfo.c:30
#2 0x7f7532a969c5 in QR_Constructor /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/qresult.c:195
#3 0x7f7532abe654 in ParseAndDescribeWithLibpq /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:2953
#4 0x7f7532a7b70a in desc_params_and_sync /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2839
#5 0x7f7532a7b932 in prepareParameters /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2899
#6 0x7f7532ab7e64 in SC_describe /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:1164
#7 0x7f7532a9b9f4 in SC_describe_ok /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:95
#8 0x7f7532a9bf27 in PGAPI_NumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:188
#9 0x7f7532ac8d28 in SQLNumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:552
#10 0x7f7533cee813 in SQLNumResultCols (/lib/x86_64-linux-gnu/libodbc.so.2+0x1d813)
Indirect leak of 32 byte(s) in 4 object(s) allocated from:
#0 0x7f7533673668 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:439
#1 0x7f7532a6bbcd in CI_set_field_info /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/columninfo.c:160
#2 0x7f7532a6ba2b in CI_read_fields_from_pgres /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/columninfo.c:108
#3 0x7f7532abecf1 in ParseAndDescribeWithLibpq /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:3038
#4 0x7f7532a7b70a in desc_params_and_sync /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2839
#5 0x7f7532a7b932 in prepareParameters /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2899
#6 0x7f7532ab7e46 in SC_describe /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:1160
#7 0x7f7532a9b9f4 in SC_describe_ok /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:95
#8 0x7f7532a9bf27 in PGAPI_NumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/results.c:188
#9 0x7f7532ac8d28 in SQLNumResultCols /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:552
#10 0x7f7533cee813 in SQLNumResultCols (/lib/x86_64-linux-gnu/libodbc.so.2+0x1d813)
SUMMARY: AddressSanitizer: 2422 byte(s) leaked in 28 allocation(s).
params ..................... ok
param-conversions .......... ok
parse ...................... ok
identity ................... ok
notice ..................... ok
arraybinding ............... ok
insertreturning ............ ok
dataatexecution ............ ok
boolsaschar ................ ok
cvtnulldate ................ ok
alter ...................... ok
quotes ..................... ok
cursors .................... ok
cursor-movement ............ ok
cursor-commit .............. ok
cursor-name ................
=================================================================
==52599==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 22 byte(s) in 1 object(s) allocated from:
#0 0x7f8d88873668 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:439
#1 0x7f8d87c7bdce in copy_statement_with_parameters /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2992
#2 0x7f8d87c8c403 in Exec_with_parameters_resolved /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:473
#3 0x7f8d87c8e612 in PGAPI_Execute /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:1182
#4 0x7f8d87c8bb65 in PGAPI_ExecDirect /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:191
#5 0x7f8d87cc83d0 in SQLExecDirect /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:322
#6 0x7f8d88f52812 in SQLExecDirect (/lib/x86_64-linux-gnu/libodbc.so.2+0x16812)
SUMMARY: AddressSanitizer: 22 byte(s) leaked in 1 allocation(s).
cursor-block-delete ........
=================================================================
==52607==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60300002d027 at pc 0x7f5154c4992a bp 0x7ffeeaabc480 sp 0x7ffeeaabbc28
READ of size 23 at 0x60300002d027 thread T0
#0 0x7f5154c49929 in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:827
#1 0x7f5153e7c8b7 in copy_statement_with_parameters /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:3162
#2 0x7f5153e8c403 in Exec_with_parameters_resolved /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:473
#3 0x7f5153e8e612 in PGAPI_Execute /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:1182
#4 0x7f5153e8bb65 in PGAPI_ExecDirect /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:191
#5 0x7f5153ec83d0 in SQLExecDirect /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:322
#6 0x7f5154b94812 in SQLExecDirect (/lib/x86_64-linux-gnu/libodbc.so.2+0x16812)
#7 0x55c49211dafa in main src/cursor-block-delete-test.c:107
#8 0x7f5154829d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
#9 0x7f5154829e3f in __libc_start_main_impl ../csu/libc-start.c:392
#10 0x55c49211d424 in _start (/home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/test/exe/cursor-block-delete-test+0x1424)
0x60300002d027 is located 0 bytes to the right of 23-byte region [0x60300002d010,0x60300002d027)
allocated by thread T0 here:
#0 0x7f5154cbf91f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7f5153e90676 in make_string /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/misc.c:129
#2 0x7f5153e8b967 in PGAPI_ExecDirect /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:157
#3 0x7f5153ec83d0 in SQLExecDirect /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:322
#4 0x7f5154b94812 in SQLExecDirect (/lib/x86_64-linux-gnu/libodbc.so.2+0x16812)
SUMMARY: AddressSanitizer: heap-buffer-overflow ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:827 in __interceptor_memcpy
Shadow bytes around the buggy address:
0x0c067fffd9b0: fd fd fa fa fd fd fd fd fa fa fd fd fd fd fa fa
0x0c067fffd9c0: fd fd fd fd fa fa fd fd fd fd fa fa fd fd fd fd
0x0c067fffd9d0: fa fa fd fd fd fd fa fa fd fd fd fd fa fa fd fd
0x0c067fffd9e0: fd fd fa fa fd fd fd fd fa fa fd fd fd fd fa fa
0x0c067fffd9f0: fd fd fd fd fa fa fd fd fd fd fa fa fd fd fd fd
=>0x0c067fffda00: fa fa 00 00[07]fa fa fa fd fd fd fa fa fa fd fd
0x0c067fffda10: fd fd fa fa fd fd fd fd fa fa fd fd fd fa fa fa
0x0c067fffda20: fd fd fd fa fa fa fd fd fd fa fa fa 00 00 01 fa
0x0c067fffda30: fa fa 00 00 02 fa fa fa 00 00 01 fa fa fa 00 00
0x0c067fffda40: 03 fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c067fffda50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==52607==ABORTING
bookmark ................... ok
declare-fetch-commit ....... ok
declare-fetch-block ........ ok
positioned-update .......... ok
bulkoperations .............
=================================================================
==52634==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 640 byte(s) in 2 object(s) allocated from:
#0 0x7f023c8bf91f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7f023bc96990 in QR_Constructor /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/qresult.c:184
#2 0x7f023bc7193d in CC_send_query_append /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/connection.c:1950
#3 0x7f023bcba98e in SC_execute /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:2049
#4 0x7f023bc8c626 in Exec_with_parameters_resolved /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:518
#5 0x7f023bc8e612 in PGAPI_Execute /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:1182
#6 0x7f023bc8bb65 in PGAPI_ExecDirect /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:191
#7 0x7f023bcc83d0 in SQLExecDirect /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:322
#8 0x7f023cfec812 in SQLExecDirect (/lib/x86_64-linux-gnu/libodbc.so.2+0x16812)
Indirect leak of 18 byte(s) in 2 object(s) allocated from:
#0 0x7f023c873668 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:439
#1 0x7f023bc970e5 in QR_set_command /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/qresult.c:368
#2 0x7f023bc983e2 in QR_from_PGresult /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/qresult.c:709
#3 0x7f023bc70759 in CC_from_PGresult /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/connection.c:1665
#4 0x7f023bc72397 in CC_send_query_append /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/connection.c:2147
#5 0x7f023bcba98e in SC_execute /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:2049
#6 0x7f023bc8c626 in Exec_with_parameters_resolved /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:518
#7 0x7f023bc8e612 in PGAPI_Execute /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:1182
#8 0x7f023bc8bb65 in PGAPI_ExecDirect /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:191
#9 0x7f023bcc83d0 in SQLExecDirect /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:322
#10 0x7f023cfec812 in SQLExecDirect (/lib/x86_64-linux-gnu/libodbc.so.2+0x16812)
SUMMARY: AddressSanitizer: 658 byte(s) leaked in 4 allocation(s).
catalogfunctions ........... ok
bindcol .................... ok
lfconversion ............... ok
cte ........................ ok
errors .....................
=================================================================
==52663==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 320 byte(s) in 1 object(s) allocated from:
#0 0x7fccea8bf91f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7fcce9c96990 in QR_Constructor /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/qresult.c:184
#2 0x7fcce9cbe654 in ParseAndDescribeWithLibpq /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:2953
#3 0x7fcce9c7b70a in desc_params_and_sync /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2839
#4 0x7fcce9c7b932 in prepareParameters /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2899
#5 0x7fcce9cbd97c in libpq_bind_and_exec /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:2685
#6 0x7fcce9cba718 in SC_execute /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:2015
#7 0x7fcce9c8c626 in Exec_with_parameters_resolved /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:518
#8 0x7fcce9c8e612 in PGAPI_Execute /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:1182
#9 0x7fcce9cc84f9 in SQLExecute /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:352
#10 0x7fcceafdb87e in SQLExecute (/lib/x86_64-linux-gnu/libodbc.so.2+0x1187e)
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7fccea8bf91f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x7fcce9c6b715 in CI_Constructor /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/columninfo.c:30
#2 0x7fcce9c969c5 in QR_Constructor /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/qresult.c:195
#3 0x7fcce9cbe654 in ParseAndDescribeWithLibpq /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:2953
#4 0x7fcce9c7b70a in desc_params_and_sync /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2839
#5 0x7fcce9c7b932 in prepareParameters /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/convert.c:2899
#6 0x7fcce9cbd97c in libpq_bind_and_exec /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:2685
#7 0x7fcce9cba718 in SC_execute /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/statement.c:2015
#8 0x7fcce9c8c626 in Exec_with_parameters_resolved /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:518
#9 0x7fcce9c8e612 in PGAPI_Execute /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/execute.c:1182
#10 0x7fcce9cc84f9 in SQLExecute /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi.c:352
#11 0x7fcceafdb87e in SQLExecute (/lib/x86_64-linux-gnu/libodbc.so.2+0x1187e)
SUMMARY: AddressSanitizer: 336 byte(s) leaked in 2 allocation(s).
error-rollback ............. ok
diagnostic ................. ok
numeric .................... ok
large-object ............... ok
large-object-data-at-exec .. ok
odbc-escapes ...............
=================================================================
==52705==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 10 byte(s) in 5 object(s) allocated from:
#0 0x7f987b673668 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:439
#1 0x7f987aad1afc in IPDSetField /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/pgapi30.c:940
#2 0x7f987aad42a7 in PGAPI_SetDescField /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/pgapi30.c:1899
#3 0x7f987aaceb10 in SQLSetDescField /home/progmachine/proj/workspaces/xenlab.workspace/psqlodbc/odbcapi30.c:448
#4 0x7f987bd01ce8 in SQLSetDescField (/lib/x86_64-linux-gnu/libodbc.so.2+0x2bce8)
SUMMARY: AddressSanitizer: 10 byte(s) leaked in 5 allocation(s).
wchar-char ................. ok
params-batch-exec .......... ok
fetch-refcursors ........... ok
```
view thread (31+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://postgresql-interfaces/psqlodbc
Cc: [email protected], [email protected]
Subject: Re: [postgresql-interfaces/psqlodbc] issue #8: Memory leaks detected in psqlodbc library
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox