[Help-gnutls] Re: GnuTLS and valgrind errors

Simon Josefsson simon at josefsson.org
Wed Jun 4 10:01:01 CEST 2008


"Rainer Gerhards" <rgerhards at gmail.com> writes:

> Hi,
>
> I am now working on sorting the nits out of my syslog/tls
> implementation. I am now running the app under valgrind [1]. I see a
> number of valgrind errors, for example this memory leak here:
>
> ==22504== 256 bytes in 2 blocks are definitely lost in loss record 14 of 31
> ==22504==    at 0x4A0739E: malloc (vg_replace_malloc.c:207)
> ==22504==    by 0x304AE328F6: _gnutls_mpi_dprint_lz (in
> /usr/lib64/libgnutls.so.13.9.1)
> ==22504==    by 0x304AE3E47C: _gnutls_dh_set_peer_public (in
> /usr/lib64/libgnutls.so.13.9.1)
> ==22504==    by 0x304AE43819: _gnutls_proc_dh_common_server_kx (in
> /usr/lib64/libgnutls.so.13.9.1)
> ==22504==    by 0x304AE3BB4F: (within /usr/lib64/libgnutls.so.13.9.1)
> ==22504==    by 0x304AE2AF81: _gnutls_recv_server_kx_message (in
> /usr/lib64/libgnutls.so.13.9.1)
> ==22504==    by 0x304AE273DF: _gnutls_handshake_client (in
> /usr/lib64/libgnutls.so.13.9.1)
> ==22504==    by 0x304AE27F77: gnutls_handshake (in
> /usr/lib64/libgnutls.so.13.9.1)
> ==22504==    by 0x7249300: Connect (nsd_gtls.c:1465)
> ==22504==    by 0x5631E92: Connect (netstrm.c:269)
> ==22504==    by 0x40EDDB: TCPSendInit (omfwd.c:302)
> ==22504==    by 0x40F477: doTryResume (omfwd.c:348)
>
> I see some more, but the real question is has GnuTLS been checked
> under a memory debugger? All of what I see may be the result of some
> wrong API calls by me [always my first line of thought ;)].

Hi!  We do run gnutls under valgrind (see 'make check'), but we haven't
had time to fix all memory leaks.  It takes time to investigate and
track down.  Patches are very welcome here, preferably with some
discussion so that we can convince ourselves that they are correct.

/Simon





More information about the Gnutls-help mailing list