[compiler-rt] r271586 - [esan] Add support for log_exe_name
Derek Bruening via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 2 13:50:30 PDT 2016
Author: bruening
Date: Thu Jun 2 15:50:30 2016
New Revision: 271586
URL: http://llvm.org/viewvc/llvm-project?rev=271586&view=rev
Log:
[esan] Add support for log_exe_name
Summary:
Adds the call needed to cache the binary name to support the sanitizer
option log_exe_name for usable log file results when running multiple
applications. Adds a test.
Reviewers: aizatsky
Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits, kubabrecka
Differential Revision: http://reviews.llvm.org/D20747
Modified:
compiler-rt/trunk/lib/esan/esan.cpp
compiler-rt/trunk/test/esan/TestCases/verbose-simple.c
Modified: compiler-rt/trunk/lib/esan/esan.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/esan/esan.cpp?rev=271586&r1=271585&r2=271586&view=diff
==============================================================================
--- compiler-rt/trunk/lib/esan/esan.cpp (original)
+++ compiler-rt/trunk/lib/esan/esan.cpp Thu Jun 2 15:50:30 2016
@@ -181,6 +181,7 @@ void initializeLibrary(ToolType Tool) {
}
WhichTool = Tool;
SanitizerToolName = "EfficiencySanitizer";
+ CacheBinaryName();
initializeFlags();
// Intercepting libc _exit or exit via COMMON_INTERCEPTOR_ON_EXIT only
Modified: compiler-rt/trunk/test/esan/TestCases/verbose-simple.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/esan/TestCases/verbose-simple.c?rev=271586&r1=271585&r2=271586&view=diff
==============================================================================
--- compiler-rt/trunk/test/esan/TestCases/verbose-simple.c (original)
+++ compiler-rt/trunk/test/esan/TestCases/verbose-simple.c Thu Jun 2 15:50:30 2016
@@ -1,5 +1,5 @@
// RUN: %clang_esan_frag -O0 %s -o %t 2>&1
-// RUN: %env_esan_opts=verbosity=1 %run %t 2>&1 | FileCheck %s
+// RUN: %env_esan_opts="verbosity=1 log_exe_name=1" %run %t 2>&1 | FileCheck %s
int main(int argc, char **argv) {
// CHECK: in esan::initializeLibrary
@@ -9,6 +9,6 @@ int main(int argc, char **argv) {
// CHECK-NEXT: Shadow #1: [124000000000-12c000000000) (512GB)
// CHECK-NEXT: Shadow #2: [148000000000-150000000000) (512GB)
// CHECK-NEXT: in esan::finalizeLibrary
- // CHECK-NEXT: {{.*}}EfficiencySanitizer is not finished: nothing yet to report
+ // CHECK-NEXT: ==verbose-simple{{.*}}EfficiencySanitizer is not finished: nothing yet to report
return 0;
}
More information about the llvm-commits
mailing list