How do I turn on
debug for memory leaks?
I re-build with
"-DCRYPTO-MDEBUG"
I changed my code to
do the following, but I get no debug output! What else do I have to
do?
Regards,
Mike
if (getenv("OPENSSL_DEBUG_MEMORY") != NULL) /* if not defined, use compiled-in library defaults */
{
if (!(0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))
{
CRYPTO_malloc_debug_init();
CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL);
TraceStub (0, "SAGSSL: OPENSSL_DEBUG_MEMORY IS ON");
}
else
{
/* OPENSSL_DEBUG_MEMORY=off */
CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0);
TraceStub (0, "SAGSSL: OPENSSL_DEBUG_MEMORY IS OFF");
}
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
}
