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:35:43 +0000 (10:35 +0100)
commit0a34f51ec13486ea1170fd8e4baed1d8369383dc
tree9debd854f9434442f8ee35fe60b2febe35b708d4
parent112afa6db65d246e91fe51799cb64cd7b3997567
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)

(cherry picked from commit f3fdfbf78c6bfc97abf9c70b03859a28ebf6b66d)
apps/speed.c