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: Dmitry Antipov
Subject: Re: gnutls_global_set_mem_functions and GNUTLS_E_MEMORY_ERROR
Date: Tue, 23 Dec 2014 12:36:11 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

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?

Dmitry




reply via email to

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