gopalshankar / address-sanitizer

Automatically exported from code.google.com/p/address-sanitizer
0 stars 0 forks source link

Incorrect implementation of atomics on ARM #234

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sanitizer implementation of atomic load/store in 
sanitizer_common/sanitizer_atomic_clang.h is X86-centric and lacks proper 
barriers for ARM (and PPC, etc). 

This is causing flakiness in SanitizerCommon.SpinMutex test on Android.

Any fix for this must work with Android NDK, which seems to lack support for 
std::atomic and atomic_load_n.

Original issue reported on code.google.com by euge...@google.com on 21 Oct 2013 at 8:23

GoogleCodeExporter commented 9 years ago
Atomics seem supported in NDK r9 with explicit -latomic link flag. 
Unfortunately, Chromium is still on NDK r8-something.
Perhaps it would be better to have an asm implementation using DMB -
it would work for ARM7+ (I think), that's all platforms we care about.

Original comment by euge...@google.com on 21 Oct 2013 at 8:25

GoogleCodeExporter commented 9 years ago
http://llvm.org/viewvc/llvm-project?rev=199802&view=rev

Original comment by dvyu...@google.com on 29 Jan 2014 at 1:19