Boost logo

Boost Users :

Subject: Re: [Boost-users] [SSL - Memory Leak] Adding include <boost/asio/ssl.hpp>
From: Mario Chacon (the.masch_at_[hidden])
Date: 2008-11-24 13:08:42


I have the problem, but I do not know how to fix it, with this example:

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <iostream>
#include <cstdlib>
#include <boost/asio/ssl.hpp>

using namespace std;

int main( int argc, char *argv[] )
{
    cout << "Hello, world !" << endl;

    ERR_remove_state( 0 );
    ENGINE_cleanup();
    CONF_modules_unload( 1 );

    ERR_free_strings();
    EVP_cleanup();
    CRYPTO_cleanup_all_ex_data();

    return EXIT_SUCCESS;
}

Is it the right order?... Because I have the same memory leak.

Thank you...

On Mon, Nov 24, 2008 at 3:37 PM, Igor R <boost.lists_at_[hidden]> wrote:

> This is known issue in open-ssl:
> http://openssl.org/support/faq.html#PROG13
>
> 2008/11/24 Ariel Somaschini <ariel_somaschini_at_[hidden]>
>
>> In a simple example of Hello World, created with Microsoft VC 2008
>> Express Edition on Windows and Linux with KDevelop, to add include
>> <boost/asio/ssl.hpp> produces a Memory Leak.
>>
>> In the case of Windows, using DevPartner, it detects the file
>> openssl_init.hpp on line 84.
>>
>> In the case of Linux, still report valgrind reachable 48 bytes in 3
>> blocks.
>>
>> The example is very simple:
>>
>> #ifdef HAVE_CONFIG_H
>> #include <config.h>
>> #endif
>>
>> #include <iostream>
>> #include <cstdlib>
>> #include <boost/asio/ssl.hpp> // Memory Leak
>>
>> using namespace std;
>>
>> int main(int argc, char *argv[])
>> {
>> cout << "Hello, world !" << endl;
>>
>> return EXIT_SUCCESS;
>> }
>>
>> Can somebody help me?
>> Thx
>> Ariel
>>
>> ------------------------------
>> ¡Conocé las nuevas funcionalidades! Nuevo Messenger Beta<http://get.live.com/messenger>
>>
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net