[Help-gnutls] thread safety of gnutls

Nikos Mavrogiannopoulos nmav at gnutls.org
Sat Mar 4 09:07:49 CET 2006


On Fri 03 Mar 2006 09:14, Ang Way Chuang wrote:
> Hi all,
>     I am very sorry for asking too many questions. I ran a
> multithread test on gnutls_record_{recv,send}. When there are
> multiple threads using one of these functions simultaneously, the
> application will segfault. However, if i protect these functions with
> mutex, it won't segfault. But i thought gnutls is thread safe by
> design.

Yes gnutls is thread safe by design. As far as I can understand from the
code below you are accessing a single session from several threads. This
is not supported. If you want to do that you have to use locks.

regards,
Nikos Mavrogiannopoulos





More information about the Gnutls-help mailing list