W3C home > Mailing lists > Public > www-lib@w3.org > January to March 2005

SSL Memory Leakage

From: Sandesh Anvekar <sanvekar@controlnet.co.in>
Date: Thu, 20 Jan 2005 14:15:06 +0530
Message-ID: <043301c4fecc$579013a0$9b0aa8c0@sandesh>
To: <www-lib@w3.org>
Hi All,
    I have come across a strange memory leak issue in libwww. It occurs when I make continuos HTTPS requests to a destination server.

    I made slight modifications to the wwwssl.c provided with the sample examples.

    Instead of just making one request I am making continuous requests.

    I have compiled xray with openssl 0.9.7a ( I also tried with 0.9.6b)

    for (;;)
      request = HTRequest_new();
      HTRequest_addConnection(request, "close", "");
        /* Start the load */
        chunk = HTLoadToChunk(getme, request);
      if (chunk)
      /* Go into the event loop... */

*I guess there is no need of event loop as HTTPS is preemptive. 

When I run this code and monitor the memory status I find that there is a continuous memory leak in this code.
Eventually it exhauts all the memory and crashed my system.

BUT the strange part of this is that it happens only if I get 200 as the response. If I request the non existing page ie 404 this behaviour does not repeat. Also this behaviour does not repeat for HTTP requests.

Could someone help me to find out the problem?

Sandesh Anvekar
Project Engineer
ControlNet (I) Pvt. Ltd. 
L-44, Unit-1, STP, 
Verna Ind Estate 
Verna - Goa 
Received on Thursday, 20 January 2005 19:23:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:56 UTC