Hi

First I would like to thank and complement you all for your great 
product.

I'm using OpenSSL with VC++ 6.0 compiler and
have a problem with Memory leaks detecting: they are reported in 
the debug output window on program exit but without the link to the 
location (no file and line number detail).

AFAIK in VC one has to use the CRT library (which has a different 
interface) for this issue.

Well I added the following macros to mem.c just before the 
implementation of CRYPTO_malloc_locked and it work. I know it is 
not a nice hack but it is simple.


#if defined ( _DEBUG ) && defined ( WIN32 ) && defined ( 
USE_CRT_DBG )
#include <crtdbg.h>
#define malloc_locked_func( size )      _malloc_dbg( size, 
_NORMAL_BLOCK, file, line )
#define free_locked_func( addr )        _free_dbg( addr, 
_NORMAL_BLOCK )
#define malloc_func(size)                       _malloc_dbg( size, 
_NORMAL_BLOCK, file, line )
#define realloc_func( addr, size)       _realloc_dbg( addr, size, 
_NORMAL_BLOCK, file, line )
#define free_func( addr )                       _free_dbg( addr, 
_NORMAL_BLOCK )
#endif

My Questions are:
Is there a way one could set OpenSSL so that the link to the file 
and line number will be available on the debug output window as 
well?

If not, would it be possible to implement such an issue in 
OpenSSL?

I know there are the debug callbacks and CRYPTO_dbg_xxx 
functions one could use for workaround but still, as a window 
programmer, I find the memory handling of the CRT library very 
comfortable.

TIA

Dror



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to