[PATCH] Add process name to Asan logfile name and report message

Evgeniy Stepanov eugenis at google.com
Fri Oct 10 04:58:10 PDT 2014


================
Comment at: lib/sanitizer_common/sanitizer_common.cc:261
@@ +260,3 @@
+    atomic_signal_fence(memory_order_seq_cst);
+    atomic_thread_fence(memory_order_seq_cst);
+    proc_self_exe_cache_initialized = true;
----------------
ygribov wrote:
> eugenis wrote:
> > This is wrong. W/o some kind of synchronization on the read path it would not prevent, for example, prefetching of proc_self_exe_cache_str before checking proc_self_exe_cache_initialized.
> > 
> > You need release store and acquire load.
> > 
> Doesn't mutex take care of that?
No, this is double-checked locking.
http://www.aristeia.com/Papers/DDJ_Jul_Aug_2004_revised.pdf

http://reviews.llvm.org/D5724






More information about the llvm-commits mailing list