Help needed for the resolution of memory leak

Поиск
Список
Период
Сортировка
От Sasmit Utkarsh
Тема Help needed for the resolution of memory leak
Дата
Msg-id CAM-5MT0z3LEPHAYSMWEgVF4izPt0uCSti3PngsdGY8aUiX-JrA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Help needed for the resolution of memory leak
Список pgsql-general
Hi Team,

I am trying to test a code which basically tries to read some data from postgresql db in a loop through a function SQL_get_tpf_rw() whose definition and other details are shared in the attached file along with the memory leak report resulted during testing. Could you let me know if i missed calling  anywhere PQclear()
in SQL_get_tpf_rw() which resulted in the below .

Last few lines from the report

=================================================================
==49697==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 197920 byte(s) in 1237 object(s) allocated from:
    #0 0xf79e300b in __interceptor_malloc (/nix/store/7z4l4r0kpgzvsi6zkjz52cvgb8ra06bd-gcc-12.2.0-lib/lib/libasan.so.8+0xbe00b)
    #1 0xf78dd3f3 in PQmakeEmptyPGresult (/nix/store/y03rfw0iycp00dxcf8vrmss4nj700fia-postgresql-14.9-lib/lib/libpq.so.5+0x113f3)

Indirect leak of 2525184 byte(s) in 1233 object(s) allocated from:
    #0 0xf79e300b in __interceptor_malloc (/nix/store/7z4l4r0kpgzvsi6zkjz52cvgb8ra06bd-gcc-12.2.0-lib/lib/libasan.so.8+0xbe00b)
    #1 0xf78dd04c in pqResultAlloc (/nix/store/y03rfw0iycp00dxcf8vrmss4nj700fia-postgresql-14.9-lib/lib/libpq.so.5+0x1104c)

Indirect leak of 632832 byte(s) in 1236 object(s) allocated from:
    #0 0xf79e300b in __interceptor_malloc (/nix/store/7z4l4r0kpgzvsi6zkjz52cvgb8ra06bd-gcc-12.2.0-lib/lib/libasan.so.8+0xbe00b)
    #1 0xf78dc7e0 in pqAddTuple (/nix/store/y03rfw0iycp00dxcf8vrmss4nj700fia-postgresql-14.9-lib/lib/libpq.so.5+0x107e0)

SUMMARY: AddressSanitizer: 3355936 byte(s) leaked in 3706 allocation(s).


Regards,
Sasmit Utkarsh
+91-7674022625
Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: arun chirappurath
Дата:
Сообщение: Re: Unable to find column
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Unable to find column