[PATCH] Add process name to Asan logfile name and report message
Evgeniy Stepanov
eugenis at google.com
Fri Oct 10 04:32:25 PDT 2014
A test?
================
Comment at: lib/asan/asan_rtl.cc:566
@@ -565,1 +565,3 @@
+ CacheBinaryName();
+
----------------
Why do you need this?
================
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;
----------------
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.
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:699
@@ -698,3 +688,3 @@
#else
uptr module_name_len = internal_readlink(
"/proc/self/exe", buf, buf_len);
----------------
This should be changed to reading the first chunk of /proc/self/cmdline. It is normally the same as /exe, but on Android it would return the "nice name" of an application if it has one.
This is probably out of the scope of this CL.
http://reviews.llvm.org/D5724
More information about the llvm-commits
mailing list