Richard Levitte - VMS Whacker <[EMAIL PROTECTED]>:

>> If the LIBEAY32.DLL is linked to the MSVCRT.DLL library and the app
>> is linked to MSVCRTD.DLL it is necessary for CRYTPO_malloc_init() to
>> be executed by the app so that the proper memory
>> allocation/deallocations routines are used.

> CRYPTO_malloc_init() did the following:
> 
>       CRYPTO_set_mem_functions(malloc,realloc,free)
> 
> This in turn initialises five function pointers in mem.c.  However,
> those variables are already initialised with exactly those values.
> Logically, this makes the CRYPTO_malloc_init() macro redudant and
> needless.
> 
> Is this possibly some kind of glitch in Win32 when it links things in
> runtime, or is it some other mystery?

The perversion here is that 'malloc' can be one function when the
library is linked and a different one for the application (note that
CRYPTO_malloc_init is a macro, so it uses the application's version of
'malloc'); i.e. the pointer actually changes although it is twice set
to 'malloc'.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to