Re: Memory "leak" when using gnutls as SSL library
Date: Tue, 10 Dec 2019 14:21:20 +0100
David Guillen Fandos wrote:
> Heaptrack insists the issue has something to do with certificate stuff,
> see https://imgur.com/yXpbkN5 I'm assuming memory usage differences
> between the Ubuntu and Fedora machines could be due to the CA cert files
> the library is loading (perhaps there's more certs in the Ubuntu machine).
I tried GnuTls on Windows. There I see only 2 leaks with no relation
to any CA-stuff:
Leak Hash: 0x7A4719DD, Count: 1, Total 24 bytes
Call Stack (TID 10976):
ucrtbase.dll!malloc()
F:\MingW32\src\gnu\gnulib\lib\malloc.c (48): libcurl.dll!rpl_malloc() + 0xA bytes
F:\MingW32\src\inet\Crypto\GnuTLS\lib\global.c (234): libcurl.dll!_gnutls_global_init() + 0xD bytes
F:\MingW32\src\inet\Crypto\GnuTLS\lib\global.c (224): libcurl.dll!gnutls_global_init() + 0xF bytes
F:\MingW32\src\inet\curl\lib\vtls\gtls.c (201): libcurl.dll!Curl_gtls_init() + 0x5 bytes
....
Leak Hash: 0x11988C17, Count: 1, Total 24 bytes
Call Stack (TID 10976):
ucrtbase.dll!malloc()
F:\MingW32\src\gnu\gnulib\lib\malloc.c (48): libcurl.dll!rpl_malloc() + 0xA bytes
F:\MingW32\src\inet\Crypto\GnuTLS\lib\random.c (82): libcurl.dll!_gnutls_rnd_init() + 0xD bytes
F:\MingW32\src\inet\Crypto\GnuTLS\lib\random.c (168): libcurl.dll!gnutls_rnd() + 0x5 bytes
F:\MingW32\src\inet\Crypto\GnuTLS\lib\handshake.c (238): libcurl.dll!_gnutls_gen_client_random() + 0x23 bytes
F:\MingW32\src\inet\Crypto\GnuTLS\lib\handshake.c (2170): libcurl.dll!send_client_hello() + 0xB bytes
F:\MingW32\src\inet\Crypto\GnuTLS\lib\handshake.c (2894): libcurl.dll!handshake_client() + 0x25 bytes
F:\MingW32\src\inet\Crypto\GnuTLS\lib\handshake.c (2726): libcurl.dll!gnutls_handshake() + 0xB bytes
F:\MingW32\src\inet\curl\lib\vtls\gtls.c (332): libcurl.dll!handshake() + 0xE bytes
....
---------
Seems to me, both leaks are leaks in GnuTls itself.
I used MSVC-2019 and the 'Visual Leak Detector' from
https://github.com/KindDragon/vld/
-- --gv ----------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2019-12-10