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

Yury Gribov tetra2005 at gmail.com
Mon Dec 1 21:49:46 PST 2014


Guys, I had to revert the commit because it caused warnings in compiler-rt when compiled with clang:
  /home/ygribov/src/compiler-rt-master/lib/sanitizer_common/sanitizer_common.cc:230:22: warning: declaration requires a global constructor [-Wglobal-constructors]
  static BlockingMutex binary_name_cache_lock(LINKER_INITIALIZED);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It looks like LINKER_INITIALIZED trick isn't working after all - a global (empty) ctor is generated anyways. Any ideas on how to fix this? I could e.g. replace this global with array of uptrs and the reinterpret_cast them to BlockingMutex. This could be wrapped in a macro to hide all the ugliness.

http://reviews.llvm.org/D5724






More information about the llvm-commits mailing list