[PATCH] D41332: LSAN_OPTIONS=log_path=xxx is ignored

Luboš Luňák via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 17 04:12:16 PST 2017


llunak created this revision.
Herald added subscribers: Sanitizers, llvm-commits.

Using LSAN_OPTIONS=log_path=xxx is ignored when code is compiled with -fsanitize=leak. This is because the code for liblsan lacks the call to __sanitizer_set_report_path().


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D41332

Files:
  lib/lsan/lsan.cc


Index: lib/lsan/lsan.cc
===================================================================
--- lib/lsan/lsan.cc
+++ lib/lsan/lsan.cc
@@ -66,6 +66,8 @@
   if (Verbosity()) ReportUnrecognizedFlags();
 
   if (common_flags()->help) parser.PrintFlagDescriptions();
+
+  __sanitizer_set_report_path(common_flags()->log_path);
 }
 
 static void OnStackUnwind(const SignalContext &sig, const void *,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41332.127274.patch
Type: text/x-patch
Size: 394 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171217/5c465340/attachment.bin>


More information about the llvm-commits mailing list