mariadb/include/atomic
Davi Arnaut be348787eb Bug#52419: x86 assembly based atomic CAS causes test failures
The problem was that the x86 assembly based atomic CAS
(compare and swap) implementation could copy the wrong
value to the ebx register, where the cmpxchg8b expects
to see part of the "comparand" value. Since the original
value in the ebx register is saved in the stack (that is,
the push instruction causes the stack pointer to change),
a wrong offset could be used if the compiler decides to
put the source of the comparand value in the stack.

The solution is to copy the comparand value directly from
memory. Since the comparand value is 64-bits wide, it is
copied in two steps over to the ebx and ecx registers.
2010-09-17 17:34:15 -03:00
..
gcc_builtins.h Bug#22320: my_atomic-t unit test fails 2010-07-23 09:37:10 -03:00
generic-msvc.h Fix for Windows atomics 2009-12-16 00:33:15 +01:00
nolock.h Bug#22320: my_atomic-t unit test fails 2010-07-23 09:37:10 -03:00
rwlock.h WL#2595 kernel-independent atomic operations 2009-11-17 17:11:32 -07:00
solaris.h Bug#52261: 64 bit atomic operations do not work on Solaris i386 .. 2010-07-27 10:25:11 -03:00
x86-gcc.h Bug#52419: x86 assembly based atomic CAS causes test failures 2010-09-17 17:34:15 -03:00