[openssl-dev] [libcrypto EVP] valgrind reports many memory leaks in wiki-example

U.Mutlu for-gmane at mutluit.com
Mon Nov 23 05:43:59 UTC 2015


U.Mutlu wrote on 11/23/2015 06:32 AM:
> Hi,
> running the following example from the openssl wiki site under valgrind
> gives many memory-leaks in the underlying library functions:
> https://wiki.openssl.org/index.php/EVP_Symmetric_Encryption_and_Decryption
>
> $ gcc -Wall -O2 test_encdec.c -lcrypto

Typo above: I rather had used the -ggdb switch:
$ gcc -Wall -ggdb test_encdec.c -lcrypto

> $ valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all
> --track-origins=yes -v ./a.out &>valgrind-output.txt
>
> Attached is the valgrind-output. It says:
>    34 not-freed blocks
>
> Are these maybe false-positives? The leak summary in the output says this:
> ==9895== LEAK SUMMARY:
> ==9895==    definitely lost: 0 bytes in 0 blocks
> ==9895==    indirectly lost: 0 bytes in 0 blocks
> ==9895==      possibly lost: 0 bytes in 0 blocks
> ==9895==    still reachable: 2,632 bytes in 34 blocks
> ==9895==         suppressed: 0 bytes in 0 blocks
>
> OS: Debian 8 amd64, using libs from the Debian repo:
> libcrypto: 5.6.1-6+deb8u1
> openssl: 1.0.1k-3+deb8u1

-- 
U.Mutlu




More information about the openssl-dev mailing list