Fix a race condition in the speed command
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Sun, 22 Dec 2019 18:40:03 +0000 (19:40 +0100)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 26 Dec 2019 09:34:19 +0000 (10:34 +0100)
commitf3fdfbf78c6bfc97abf9c70b03859a28ebf6b66d
treea265ddaaf1360421b4226a300bfb55bf5b925734
parent812500651954a7a084550d72d2f8ac9dc3158327
Fix a race condition in the speed command

The timer alarm sets run = 0, while the benchmark
does run = 1 in the initialization code.  That is
a race condition, if the timer goes off too early
the benchmark runs forever.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10680)
apps/speed.c