gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnutls_global_set_mem_functions and GNUTLS_E_MEMORY_ERROR


From: Nikos Mavrogiannopoulos
Subject: Re: gnutls_global_set_mem_functions and GNUTLS_E_MEMORY_ERROR
Date: Tue, 23 Dec 2014 12:30:42 +0200

On Tue, 2014-12-23 at 12:36 +0300, Dmitry Antipov wrote:
> On 12/23/2014 10:58 AM, Nikos Mavrogiannopoulos wrote:
> 
> > They should still work but they are very hard to get right now that
> > gnutls is being initialized in the constructor. That is because the
> > default gnutls_malloc() will have already been used prior to a program
> > calling gnutls_global_set_mem_functions().
> 
> IMO this approach tends to create more problems than it tries to resolve.
> But if you strongly insists on using __attribute__((constructor)) to
> initialize GnuTLS, what about defining gnutls_malloc etc. with
> __attribute__((weak)) to allow users to replace them at link time?

That would still create extra work if we ever move to talloc(), but, if
there is a patch for that (and even better a test case as well), I'll
apply it.

regards,
Nikos





reply via email to

[Prev in Thread] Current Thread [Next in Thread]