]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: checks/threads: use ha_random() and not rand()
authorWilly Tarreau <w@1wt.eu>
Sun, 8 Mar 2020 16:53:53 +0000 (17:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 8 Mar 2020 16:56:47 +0000 (17:56 +0100)
commit5a6d3e797edc7ac52560cc1a5bd90a984b6b350b
tree190629da1735994e93aa079a306375b3e04de1cf
parentb9f54c55929eddb6446f8d5c983fb8f1008eb0c6
BUG/MINOR: checks/threads: use ha_random() and not rand()

In order to honor spread_checks we currently call rand() which is not
thread safe and which must never turn its internal state to zero. This
is not thread safe, let's use ha_random() instead. This is a complement
to commimt 52bf839394 ("BUG/MEDIUM: random: implement a thread-safe and
process-safe PRNG") and may be backported with it.
src/checks.c