gnutls_handshake crash on multithreading
Nikos Mavrogiannopoulos
nmav at gnutls.org
Wed Feb 17 10:28:51 CET 2010
If noone from this list can help (i cannot), please try the
gcrypt-devel or even the help-gnutls
just in case someone has tried with custom mutex functions for libgcrypt.
On Tue, Feb 16, 2010 at 8:46 PM, Vasiliy Ivanov <vivanov at te.net.ua> wrote:
> No, it's my own structure(see below).
> It works at program start, but no methods are called at gnutls_handshake processing.
>
> static int boost_mutex_init(void **priv)
> {
> boost::mutex *lock = new boost::mutex();
> if (!lock)
> return ENOMEM;
> *priv = lock;
> return 0;
> }
>
> static int boost_mutex_destroy(void **lock)
> {
> delete reinterpret_cast<boost::mutex*>(*lock);
> return 0;
> }
>
> static int boost_mutex_lock(void **lock)
> {
> reinterpret_cast<boost::mutex*>(*lock)->lock();
> return 0;
> }
>
> static int boost_mutex_unlock(void **lock)
> {
> reinterpret_cast<boost::mutex*>(*lock)->unlock();
> return 0;
> }
> //static struct gcry_thread_cbs gcry_threads_other;
> static struct gcry_thread_cbs gcry_threads_boost =
> {
> GCRY_THREAD_OPTION_USER,
> NULL,
> boost_mutex_init,
> boost_mutex_destroy,
> boost_mutex_lock,
> boost_mutex_unlock
> };
>
>
>
> -----Original Message-----
> From: tlillqvist at gmail.com [mailto:tlillqvist at gmail.com] On Behalf Of Tor Lillqvist
> Sent: Tuesday, February 16, 2010 3:03 PM
> To: Vasiliy Ivanov
> Cc: Simon Josefsson; bug-gnutls at gnu.org
> Subject: Re: gnutls_handshake crash on multithreading
>
>> gcry_control( GCRYCTL_SET_THREAD_CBS,
>> &gcry_threads_boost );
>
>> I use .dll with .lib file linked.
>
> Where does gcry_threads_boost come from, if from a DLL are you sure it is imported correctly?
>
> --tml
>
>
>
> _______________________________________________
> Gnutls-devel mailing list
> Gnutls-devel at gnu.org
> http://lists.gnu.org/mailman/listinfo/gnutls-devel
>
More information about the Gnutls-devel
mailing list