branch master?

Simon Josefsson simon at josefsson.org
Thu Apr 15 11:18:37 CEST 2010


Nikos Mavrogiannopoulos <nmav at gnutls.org> writes:

> Simon Josefsson wrote:
>> Another thing, running most of the self tests (including the easy to
>> debug mini.c) results in a valgrind warning -- I suspect this was
>> introduced with the new crypto code (the warning is in the MPI parts),
>> could you take a look?
>
> I don't see any warnings. Could you send me the warnings you see?
> It could be some 64/32 bit issue.

My system is 32bit.  Here is the error:

==19676== Conditional jump or move depends on uninitialised value(s)
==19676==    at 0x413E329: _gcry_mpi_print (mpicoder.c:584)
==19676==    by 0x40F1268: gcry_mpi_print (visibility.c:308)
==19676==    by 0x4066628: wrap_gcry_mpi_print (mpi-libgcrypt.c:77)
==19676==    by 0x4063249: _gnutls_dh_common_print_server_kx (auth_dh_common.c:327)
==19676==    by 0x404C142: gen_anon_server_kx (auth_anon.c:104)
==19676==    by 0x4046D87: _gnutls_send_server_kx_message (gnutls_kx.c:207)
==19676==    by 0x40436EF: _gnutls_handshake_server (gnutls_handshake.c:3022)
==19676==    by 0x4043E19: gnutls_handshake (gnutls_handshake.c:2698)
==19676==    by 0x80491AB: doit (mini.c:204)
==19676==    by 0x80498AC: main (utils.c:149)
==19676== 
==19676== Conditional jump or move depends on uninitialised value(s)
==19676==    at 0x413E329: _gcry_mpi_print (mpicoder.c:584)
==19676==    by 0x40F1268: gcry_mpi_print (visibility.c:308)
==19676==    by 0x4066628: wrap_gcry_mpi_print (mpi-libgcrypt.c:77)
==19676==    by 0x406326C: _gnutls_dh_common_print_server_kx (auth_dh_common.c:328)
==19676==    by 0x404C142: gen_anon_server_kx (auth_anon.c:104)
==19676==    by 0x4046D87: _gnutls_send_server_kx_message (gnutls_kx.c:207)
==19676==    by 0x40436EF: _gnutls_handshake_server (gnutls_handshake.c:3022)
==19676==    by 0x4043E19: gnutls_handshake (gnutls_handshake.c:2698)
==19676==    by 0x80491AB: doit (mini.c:204)
==19676==    by 0x80498AC: main (utils.c:149)
==19676== 
==19676== Conditional jump or move depends on uninitialised value(s)
==19676==    at 0x413E329: _gcry_mpi_print (mpicoder.c:584)
==19676==    by 0x40F1268: gcry_mpi_print (visibility.c:308)
==19676==    by 0x4066628: wrap_gcry_mpi_print (mpi-libgcrypt.c:77)
==19676==    by 0x406328F: _gnutls_dh_common_print_server_kx (auth_dh_common.c:329)
==19676==    by 0x404C142: gen_anon_server_kx (auth_anon.c:104)
==19676==    by 0x4046D87: _gnutls_send_server_kx_message (gnutls_kx.c:207)
==19676==    by 0x40436EF: _gnutls_handshake_server (gnutls_handshake.c:3022)
==19676==    by 0x4043E19: gnutls_handshake (gnutls_handshake.c:2698)
==19676==    by 0x80491AB: doit (mini.c:204)
==19676==    by 0x80498AC: main (utils.c:149)
==19676== 
==19676== Conditional jump or move depends on uninitialised value(s)
==19676==    at 0x413E329: _gcry_mpi_print (mpicoder.c:584)
==19676==    by 0x40F1268: gcry_mpi_print (visibility.c:308)
==19676==    by 0x4066628: wrap_gcry_mpi_print (mpi-libgcrypt.c:77)
==19676==    by 0x40638E6: _gnutls_gen_dh_common_client_kx (auth_dh_common.c:143)
==19676==    by 0x4046B7F: _gnutls_send_client_kx_message (gnutls_kx.c:303)
==19676==    by 0x404307F: _gnutls_handshake_client (gnutls_handshake.c:2837)
==19676==    by 0x4043E97: gnutls_handshake (gnutls_handshake.c:2694)
==19676==    by 0x80491F0: doit (mini.c:195)
==19676==    by 0x80498AC: main (utils.c:149)
==19676== 
Self test `./mini' finished with 0 errors
==19676== Invalid free() / delete / delete[]
==19676==    at 0x4024866: free (vg_replace_malloc.c:325)
==19676==    by 0x42725DB: ??? (in /lib/i686/cmov/libc-2.10.2.so)
==19676==    by 0x42720B9: ??? (in /lib/i686/cmov/libc-2.10.2.so)
==19676==    by 0x4020412: _vgnU_freeres (vg_preloaded.c:62)
==19676==    by 0x41FCA43: _Exit (_exit.S:30)
==19676==    by 0x41924DE: exit (exit.c:100)
==19676==    by 0x4179B5C: (below main) (libc-start.c:254)
==19676==  Address 0x415e580 is not stack'd, malloc'd or (recently) free'd
==19676== 
PASS: mini

>> Also, I have disabled the safe-renegotiation test because it doesn't
>> appear portable, it breaks with MinGW+Wine.  Still haven't tested the
>> more exotic platforms like Solaris..
>
> What is non-portable about it? It is the same as
> openpgp-certs/testcerts.

That one is also not portable, it uses bash...  Would probably be
noticed when building on Solaris.  Maybe it can be rewritten using
standard /bin/sh constructs.

/Simon





More information about the Gnutls-devel mailing list