Gratuitous gcry_fast_random_poll

Werner Koch wk at gnupg.org
Fri May 7 11:01:27 CEST 2004


On Wed, 05 May 2004 21:13:11 +0200, Marcus Brinkmann said:

> Yes, but compare it with pthread: you have error checking locks
> (robust locks) and fast locks.  And everybody just uses the fast locks
> and never checks the error.

Which is bad because you won't detect logical errors in your program.

> It's not a good thing if a library gives an assertion failure, unless
> there really is an internal error.  An error value returned would be

It is an internal error.  The library is used in a non-allowed way and
all shit may happen later.  Be glad that it tells you that - even if
you don't want so.  It is not different from free(3) which might abort
the process if it detects an invalid state of the heaps.

  Werner




More information about the Gcrypt-devel mailing list