]> granicus.if.org Git - libatomic_ops/commit
Workaround a bug in double-wide intrinsics of Clang/x64 with ASan enabled
authorIvan Maidanski <ivmai@mail.ru>
Thu, 24 Nov 2016 17:13:06 +0000 (20:13 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 24 Nov 2016 17:13:06 +0000 (20:13 +0300)
commit637f7fe16e11118f33e23abd63469229d6df6e08
treee944a050413d455a0032a1b2c6fd4ddfc449ac91
parentf82a19e191b4515f04b3e57b9bab3e73e4c02ca7
Workaround a bug in double-wide intrinsics of Clang/x64 with ASan enabled

As of clang-3.8, double-wide arguments are incorrectly passed to
atomic intrinsic operations for x64 target if Address Sanitizer is
enabled.

* src/atomic_ops.h [__has_feature(address_sanitizer)]
(AO_ADDRESS_SANITIZER): New internal macro.
* src/atomic_ops/sysdeps/gcc/x86.h [AO_GCC_ATOMIC_TEST_AND_SET
&& __clang__ && __x86_64__ && !__ILP32__]
(AO_SKIPATOMIC_double_compare_and_swap_ANY, AO_SKIPATOMIC_double_load,
AO_SKIPATOMIC_double_load_acquire, AO_SKIPATOMIC_double_store,
AO_SKIPATOMIC_double_store_release): Define also if AO_ADDRESS_SANITIZER;
update comment.
src/atomic_ops.h
src/atomic_ops/sysdeps/gcc/x86.h