libgcrypt RNG locking
Werner Koch
wk at gnupg.org
Wed Feb 26 16:42:23 CET 2014
On Wed, 26 Feb 2014 13:53, smueller at chronox.de said:
> If I try to trigger a simple deadlock by calling:
>
> drbg_lock(0);
> drbg_lock(0);
>
> there is no deadlock.
There are two possible reasons: gpgrt could be using recursive mutexes
and thus you won't be able to create a deadlock with just one thread.
However, for common Linux systems this is not the case. The second and
more likely reason is that you did not link with -lpthread and thus the
process has not thread support which makes mutexes pointless. libgpg-error
uses ELF weak symbols to implement that.
Salam-Shalom,
Werner
--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
More information about the Gcrypt-devel
mailing list