]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: threads: fix double-word CAS on non-optimized 32-bit platforms
authorWilly Tarreau <w@1wt.eu>
Mon, 27 May 2019 15:37:20 +0000 (17:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 27 May 2019 15:40:59 +0000 (17:40 +0200)
commitc3b595825583386bbc28fcd0c77c5ff926fcf345
tree142019d104c07e8342a876ed9f988b17966dc2d8
parentbff005ae587c8d51deb4a1e916a2b9e42f0c6eb1
BUG/MEDIUM: threads: fix double-word CAS on non-optimized 32-bit platforms

On armv7 haproxy doesn't work because of the fixes on the double-word
CAS. There are two issues. The first one is that the last argument in
case of dwcas is a pointer to the set of value and not a value ; the
second is that it's not enough to cast the data as (void*) since it will
be a single word. Let's fix this by using the pointers as an array of
long. This was tested on i386, armv7, x86_64 and aarch64 and it is now
fine. An alternate approach using a struct was attempted as well but it
used to produce less optimal code.

This fix must be backported to 1.9. This fixes github issue #105.

Cc: Olivier Houchard <ohouchard@haproxy.com>
include/common/hathreads.h
src/fd.c