]> granicus.if.org Git - libatomic_ops/commit
Fix test_atomic failure caused unaligned AO_double_t access on x86
authorIvan Maidanski <ivmai@mail.ru>
Tue, 24 Jan 2017 19:46:57 +0000 (22:46 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 6 Feb 2017 06:31:18 +0000 (09:31 +0300)
commitc386add710a5311966fc054e11222c27ca329c09
tree655dc6dd26e4b66ebb4af585a793d171735dc7da
parent0b62dec5005d01ffcc0ccbec60217128323ecbd9
Fix test_atomic failure caused unaligned AO_double_t access on x86

The failure is caused by violation of an assertion that checks
AO_double_t variable is 8-byte aligned on x86.

* doc/README.txt (AO_double_t): Add note about required alignment.
* src/atomic_ops/sysdeps/standard_ao_double_t.h (AO_double_t): Add
comment about alignment.
* src/atomic_ops_stack.h (AO_stack_t): Likewise.
* tests/test_atomic_include.template (test_atomicXX): Define old_w, w
local variables as static (as otherwise, e.g., they could have 4-byte
alignment on x86); add comment.
doc/README.txt
src/atomic_ops/sysdeps/standard_ao_double_t.h
src/atomic_ops_stack.h
tests/test_atomic_include.template