valgrind errors

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

valgrind errors

Alexis Lefort

Hello all,

I develeopped a server which seems to work quite fine. When I use
Valgrind to check for problems, it returns me thousands of problems wich
seems to be caused by the OpenSSL librairie!
follows some of the returns:

==23622== Syscall param write(buf) points to uninitialised byte(s)
==23622==    at 0x82C573: __write_nocancel (in /lib/tls/libc-2.3.3.so)
==23622==    by 0x7D202A: _IO_do_write@@GLIBC_2.1 (in
/lib/tls/libc-2.3.3.so)
==23622==    by 0x7D17C4: _IO_file_close_it@@GLIBC_2.1 (in
/lib/tls/libc-2.3.3.so)
==23622==    by 0x7C83F1: fclose@@GLIBC_2.1 (in /lib/tls/libc-2.3.3.so)
==23622==    by 0x8073637: RAND_write_file (in
/home/tools/version_courante/mybin)
==23622==    by 0xCF39EAD1: ???
==23622==  Address 0x25989000 is not stack'd, malloc'd or (recently) free'd
==23622==

==23622== Thread 3:
==23622== Conditional jump or move depends on uninitialised value(s)
==23622==    at 0x8072F5E: lh_retrieve (in
/home/tools/version_courante/mybin)
==23622==
==23622== Use of uninitialised value of size 4
==23622==    at 0x8072F73: lh_retrieve (in
/home/tools/version_courante/mybin)
...

The first lines are retruned when calling RAND_write_file(), the other
lines are all returned when calling SSL_accept().
Does anyone know if it is an error of my own or not?

Alexis
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: valgrind errors

Nils Larsch
Alexis Lefort wrote:

>
> Hello all,
>
> I develeopped a server which seems to work quite fine. When I use
> Valgrind to check for problems, it returns me thousands of problems wich
> seems to be caused by the OpenSSL librairie!
> follows some of the returns:
>
> ==23622== Syscall param write(buf) points to uninitialised byte(s)
> ==23622==    at 0x82C573: __write_nocancel (in /lib/tls/libc-2.3.3.so)
> ==23622==    by 0x7D202A: _IO_do_write@@GLIBC_2.1 (in
> /lib/tls/libc-2.3.3.so)
> ==23622==    by 0x7D17C4: _IO_file_close_it@@GLIBC_2.1 (in
> /lib/tls/libc-2.3.3.so)
> ==23622==    by 0x7C83F1: fclose@@GLIBC_2.1 (in /lib/tls/libc-2.3.3.so)
> ==23622==    by 0x8073637: RAND_write_file (in
> /home/tools/version_courante/mybin)
> ==23622==    by 0xCF39EAD1: ???
> ==23622==  Address 0x25989000 is not stack'd, malloc'd or (recently) free'd
> ==23622==
>
> ==23622== Thread 3:
> ==23622== Conditional jump or move depends on uninitialised value(s)
> ==23622==    at 0x8072F5E: lh_retrieve (in
> /home/tools/version_courante/mybin)
> ==23622==
> ==23622== Use of uninitialised value of size 4
> ==23622==    at 0x8072F73: lh_retrieve (in
> /home/tools/version_courante/mybin)
> ...
>
> The first lines are retruned when calling RAND_write_file(), the other
> lines are all returned when calling SSL_accept().
> Does anyone know if it is an error of my own or not?

build openssl with "./config ... -DPURIFY ..." and then try again.
most of the "uninitialized ..." warnings are caused by the fact that
openssl uses uninitialized memory during the random number generation
(and using uninitialized memory there isn't/shouldn't be problematic).
I guess this should be put in the FAQ ....

Nils
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: valgrind errors

Alexis Lefort
I have just tried the option -DPURIFY and unfortunately it does not
help. I still have hundreds of " Conditional jump..." and "Use of
uninitialised value...".
Any other suggestion would be greatly appreciated. :)

Alexis

Nils Larsch a écrit :

> Alexis Lefort wrote:
>
>>
>> Hello all,
>>
>> I develeopped a server which seems to work quite fine. When I use
>> Valgrind to check for problems, it returns me thousands of problems wich
>> seems to be caused by the OpenSSL librairie!
>> follows some of the returns:
>>
>> ==23622== Syscall param write(buf) points to uninitialised byte(s)
>> ==23622==    at 0x82C573: __write_nocancel (in /lib/tls/libc-2.3.3.so)
>> ==23622==    by 0x7D202A: _IO_do_write@@GLIBC_2.1 (in
>> /lib/tls/libc-2.3.3.so)
>> ==23622==    by 0x7D17C4: _IO_file_close_it@@GLIBC_2.1 (in
>> /lib/tls/libc-2.3.3.so)
>> ==23622==    by 0x7C83F1: fclose@@GLIBC_2.1 (in /lib/tls/libc-2.3.3.so)
>> ==23622==    by 0x8073637: RAND_write_file (in
>> /home/tools/version_courante/mybin)
>> ==23622==    by 0xCF39EAD1: ???
>> ==23622==  Address 0x25989000 is not stack'd, malloc'd or (recently)
>> free'd
>> ==23622==
>>
>> ==23622== Thread 3:
>> ==23622== Conditional jump or move depends on uninitialised value(s)
>> ==23622==    at 0x8072F5E: lh_retrieve (in
>> /home/tools/version_courante/mybin)
>> ==23622==
>> ==23622== Use of uninitialised value of size 4
>> ==23622==    at 0x8072F73: lh_retrieve (in
>> /home/tools/version_courante/mybin)
>> ...
>>
>> The first lines are retruned when calling RAND_write_file(), the other
>> lines are all returned when calling SSL_accept().
>> Does anyone know if it is an error of my own or not?
>
>
> build openssl with "./config ... -DPURIFY ..." and then try again.
> most of the "uninitialized ..." warnings are caused by the fact that
> openssl uses uninitialized memory during the random number generation
> (and using uninitialized memory there isn't/shouldn't be problematic).
> I guess this should be put in the FAQ ....
>
> Nils

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]