cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cURL HTTPS implementation appears to be leaking memory

From: Andre Guibert de Bruet <andy_at_siliconlandmark.com>
Date: Thu, 31 May 2007 13:55:59 -0400

On May 31, 2007, at 3:13 AM, Daniel Stenberg wrote:

> On Wed, 30 May 2007, Andre Guibert de Bruet wrote:
>
>> I have been trying to track down the source of the increasing VSZ
>> and RSS in a program which uses libcurl for a couple of weeks and
>> came up with a simple test case which displays the same thing as
>> my program.
>
> Did you try using valgrind?

Daniel,

Thanks for suggesting valgrind. I get the following:

==8732== malloc/free: in use at exit: 192067 bytes in 2541 blocks.
==8732== malloc/free: 287281 allocs, 284740 frees, 94694311 bytes
allocated.
==8732==
==8732== 16032 bytes in 501 blocks are definitely lost in loss record
20 of 23
==8732== at 0x3C01E9D3: calloc (vg_replace_malloc.c:141)
==8732== by 0x3C06B257: kssl_ctx_new (in /lib/libssl.so.0.9.7a)
==8732== by 0x3C05DB77: SSL_new (in /lib/libssl.so.0.9.7a)
==8732== by 0x80550A7: Curl_ossl_connect_step1 (in /root/dev/
UPCSC2/tools/a.out)

When running my test program on Mac OS X with 0.9.8e, the memory
profile is well-behaved. It would appear that OpenSSL 0.9.7a is the
culprit.

Thanks for the help!

Cheers,

/* Andre Guibert de Bruet * 6f43 6564 7020 656f 2e74 4220 7469 6a20 */
/* Code poet / Sysadmin * 636f 656b 2e79 5320 7379 6461 696d 2e6e */
/* GSM: +1 734 846 8758 * 5520 494e 2058 6c73 7565 6874 002e 0000 */
/* WWW: siliconlandmark.com * C/C++, Java, Perl, PHP, SQL, XHTML, XML */
Received on 2007-05-31