]> 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>
Tue, 24 Jan 2017 19:51:19 +0000 (22:51 +0300)
commitd1ad2daa7e195c82e3e5423e31af90fb01f7307d
tree3787c4a8a4eb886395e705f9537b52e4461bf42d
parent4949e9b8cb409288fcaa0553ead9704ca6219a23
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