I think I understand where you're going with that. But, I don't think
OpenSSL checks if it has been set already.
int CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *,
size_t),
void (*f)(void *))
{
if (!allow_customize)
return 0;
if ((m == 0) || (r == 0) || (f == 0))
return 0;
malloc_func=m; malloc_ex_func=default_malloc_ex;
realloc_func=r; realloc_ex_func=default_realloc_ex;
free_func=f;
malloc_locked_func=m;
malloc_locked_ex_func=default_malloc_locked_ex;
free_locked_func=f;
return 1;
}
I know that allow_customize is always 1 and that the only other check
that happens is if one of the three functions in the
CRYPTO_set_mem_functions parameters was left at zero (NULL?). I do
suppose it is worth a try to test aolserver without nsopenssl, if the
results differ. It's equally strange that setting -DNO_DH=1 would
allow the entire setup (aolserver+nsopenssl+tls) to function without
crashing.
I will try and test aolserver without ssl and post back my results.
On May 7, 12:13 am, Jeff Hobbs <[email protected]> wrote:
> Is it possible that both nsopenssl and tls are in use, and that they
> both might be initializing openssl in the same process? I'm not sure if
> this would be a support case if so.
>
> On 05/05/2009 6:16 PM, Sep Ng wrote:
>
> > Hi Jeff,
>
> > I took a closer look at the patch you posted. It seems that the
> > CRYPTO_set_mem_functions is not succeeding. The default memory
> > functions that CRYPTO uses are malloc, realloc, and free but from the
> > back trace, it looks like ns_malloc, ns_realloc and ns_free are the
> > ones being used for some reason. I think I'm running out of ideas
> > here. It's unclear why CRYPTO_set_mem_function would return 0 instead
> > of 1, unless it's some bug in my OpenSSL package in Ubuntu.
>
> > On May 6, 8:42 am, Jack Schmidt <[email protected]> wrote:
> >> I've just yanked the debug. This includes the backtrace and memory frame
> >> info and the local info for most of the frames up until #11 CTX_Init. As
> >> before, the crash happens when DH_free is called.
>
> >> 2009/5/6 Jeff Hobbs <[email protected]>
>
> >>> Of the presented patches, I didn't find one that seemed to actually work,
> >>> so I wrote one based on those presented. It is attached. Please test it
> >>> in
> >>> your environments. I have tested that it passes the basic tls test suite
> >>> against a threaded Tcl 8.5.7 core build on Linux-x64 (and verified that
> >>> OPENSSL_THREADS was true for this install).
> >>> This patch is against tls 1.6 head.
> >>> Jeff
> >>> On 05/05/2009 3:42 PM, Sep Ng wrote:
> >>>> I'll try it. I didn't give it much thought at first but looking at it
> >>>> again, I think it might prevent the long string of ns_free and other
> >>>> calls to free memory after DH_free.
> >>>> On May 6, 3:43 am, Jeff Hobbs <[email protected]> wrote:
> >>>>> Just starting to look at this, but from the nsopenssl.c I saw another
> >>>>> interesting function not used by TLS:
> >>>>> if (CRYPTO_set_mem_functions(ns_malloc, ns_realloc, ns_free) == 0) ...
> >>>>> We could do the same and point to Tcl_Alloc, Tcl_Realloc and Tcl_Free.
> >>>>> I'm not sure they are necessary, and CRYPTO_set_mem_debug_functions
> >>>>> isn't used, but it might help debug.
>
> ....
>
> --
> AOLserver -http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to
> <[email protected]> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
> field of your email blank.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to
<[email protected]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.