cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Memory leak in a libcurl with mbedtls

From: Mindaugas Jaraminas <minde.j_at_gmail.com>
Date: Fri, 18 Mar 2016 15:31:24 +0200

Hi

Here is Valgrind report with debugging symbols

I will try to compile mbedtls with debugging symbols as well.

==28845==
==28845== HEAP SUMMARY:
==28845== in use at exit: 1,520 bytes in 10 blocks
==28845== total heap usage: 21,129 allocs, 21,119 frees, 2,049,867 bytes
allocated
==28845==
==28845== 24 bytes in 1 blocks are definitely lost in loss record 2 of 10
==28845== at 0x4C2CC70: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28845== by 0x505B29B: ssl_append_key_cert (in
/home/mindaugas/.../mbedtls-2.2.1/install/lib/libmbedtls.so.10)
==28845== by 0x41258A: mbedtls_connect_step1 (mbedtls.c:373)
==28845== by 0x413170: mbedtls_connect_common (mbedtls.c:722)
==28845== by 0x4133EE: Curl_mbedtls_connect_nonblocking (mbedtls.c:811)
==28845== by 0x4108B0: Curl_ssl_connect_nonblocking (vtls.c:322)
==28845== by 0x41A7C5: https_connecting (http.c:1386)
==28845== by 0x41A723: Curl_http_connect (http.c:1356)
==28845== by 0x42A8D6: Curl_protocol_connect (url.c:3668)
==28845== by 0x4088F8: multi_runsingle (multi.c:1264)
==28845== by 0x409A1D: curl_multi_perform (multi.c:1821)
==28845== by 0x403AE0: easy_transfer (easy.c:724)
==28845==
==28845== 1,496 (336 direct, 1,160 indirect) bytes in 1 blocks are
definitely lost in loss record 10 of 10
==28845== at 0x4C2CC70: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28845== by 0x54B06CF: rsa_alloc_wrap (in
/home/mindaugas/.../mbedtls-2.2.1/install/lib/libmbedcrypto.so.0)
==28845== by 0x54AFFC3: mbedtls_pk_setup (in
/home/mindaugas/.../mbedtls-2.2.1/install/lib/libmbedcrypto.so.0)
==28845== by 0x54B2F5B: mbedtls_pk_parse_key (in
/home/mindaugas/.../mbedtls-2.2.1/install/lib/libmbedcrypto.so.0)
==28845== by 0x54B3288: mbedtls_pk_parse_keyfile (in
/home/mindaugas/.../mbedtls-2.2.1/install/lib/libmbedcrypto.so.0)
==28845== by 0x412009: mbedtls_connect_step1 (mbedtls.c:269)
==28845== by 0x413170: mbedtls_connect_common (mbedtls.c:722)
==28845== by 0x4133EE: Curl_mbedtls_connect_nonblocking (mbedtls.c:811)
==28845== by 0x4108B0: Curl_ssl_connect_nonblocking (vtls.c:322)
==28845== by 0x41A7C5: https_connecting (http.c:1386)
==28845== by 0x41A723: Curl_http_connect (http.c:1356)
==28845== by 0x42A8D6: Curl_protocol_connect (url.c:3668)
==28845==
==28845== *LEAK SUMMARY:*
==28845== *definitely lost: 360 bytes in 2 blocks*
==28845== *indirectly lost: 1,160 bytes in 8 blocks*
==28845== possibly lost: 0 bytes in 0 blocks
==28845== still reachable: 0 bytes in 0 blocks
==28845== suppressed: 0 bytes in 0 blocks
==28845==
==28845== For counts of detected and suppressed errors, rerun with: -v
==28845== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)

-- 
Best regards
MJ
>

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-03-18