[PATCH] [ASan] Add process basename to log name and error message to simplify analysis of sanitized systems logs.

Yury Gribov tetra2005 at gmail.com
Mon Mar 16 07:20:35 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/sanitizer_common/sanitizer_common.cc:360
@@ +359,3 @@
+  static bool binary_name_initialized;
+  if (LIKELY(binary_name_initialized))
+    return;
----------------
kcc wrote:
> ygribov wrote:
> > kcc wrote:
> > > This will not catch a situation where someone calls CacheBinaryName() twice, which should be illegal. 
> > > Instead, do a hard check that this is the first call. 
> > Unfortunately we do have situations where double call is needed e.g. when app is both A- and UB-sanitized.
> I believe the recent refactoring by Alexey allows to solve this. 
> Really, if we allow double call but do not allow lazy initialization later on we are asking for trouble. 
Could you be more specific? I can see that ASan and UBSan have been changed to have isolated copies of some core structures (e.g. suppressions). But error reporting (e.g. report_file or log_path) are still shared across all sanitizers with mutexes being used to serialize accesses.

http://reviews.llvm.org/D7333

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list