[PATCH] asan: fix atomic operations on ARM

Evgeniy Stepanov eugenis at google.com
Mon Jan 20 07:00:09 PST 2014



================
Comment at: lib/sanitizer_common/sanitizer_atomic.h:56
@@ +55,3 @@
+// On 32-bit platforms u64 is not necessary aligned on 8 bytes.
+typedef ALIGNED(8) atomic_uint64_t atomic_uint64_t;
+
----------------
Why not put the attribute on struct definition? AFAIK, this way 'atomic_uint64_t' is aligned, but "struct atomic_uint64_t" is not?

================
Comment at: CMakeLists.txt:185
@@ +184,3 @@
+if(ANDROID)
+  list(APPEND SANITIZER_COMMON_CFLAGS -march=armv7)
+endif()
----------------
Is this still needed if we use _sync_val_compare_and_swap and not hand-written assembly?


http://llvm-reviews.chandlerc.com/D2582



More information about the llvm-commits mailing list