BUG/MEDIUM: random: align the state on 2*64 bits for ARM64
authorWilly Tarreau <w@1wt.eu>
Wed, 11 Mar 2020 23:31:18 +0000 (00:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 11 Mar 2020 23:34:22 +0000 (00:34 +0100)
commit1544c14c57f4e77df2a8dcc27bc7eaaba8bbb833
tree754b5cf04417f5a423f990c37d4ab9440d7cd50c
parent84fd8a77b76ca157fce9d70e1cb0cc1f86ec6ecb
BUG/MEDIUM: random: align the state on 2*64 bits for ARM64

x86_64 and ARM64 do support the double-word atomic CAS. However on
ARM it must be done only on aligned data. The random generator makes
use of such double-word atomic CAS when available but didn't enforce
alignment, which causes ARM64 to crash early in the startup since
commit 52bf839 ("BUG/MEDIUM: random: implement a thread-safe and
process-safe PRNG").

This commit just unconditionally aligns the arrays. It must be
backported to all branches where the commit above is backported
(likely till 2.0).
src/standard.c