[PATCH] D20747: [esan] Add support for log_exe_name
Derek Bruening via llvm-commits
llvm-commits at lists.llvm.org
Fri May 27 13:03:40 PDT 2016
bruening created this revision.
bruening added a reviewer: aizatsky.
bruening added subscribers: llvm-commits, eugenis, kcc, zhaoqin, vitalybuka.
Herald added a subscriber: kubabrecka.
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.
http://reviews.llvm.org/D20747
Files:
lib/esan/esan.cpp
test/esan/TestCases/verbose-simple.c
Index: test/esan/TestCases/verbose-simple.c
===================================================================
--- test/esan/TestCases/verbose-simple.c
+++ test/esan/TestCases/verbose-simple.c
@@ -1,13 +1,13 @@
// 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
// CHECK-NEXT: Shadow scale=2 offset=0x440000000000
// CHECK-NEXT: Shadow #0: [110000000000-114000000000) (256GB)
// 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;
}
Index: lib/esan/esan.cpp
===================================================================
--- lib/esan/esan.cpp
+++ lib/esan/esan.cpp
@@ -159,6 +159,7 @@
}
WhichTool = Tool;
SanitizerToolName = "EfficiencySanitizer";
+ CacheBinaryName();
initializeFlags();
// Intercepting libc _exit or exit via COMMON_INTERCEPTOR_ON_EXIT only
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20747.58827.patch
Type: text/x-patch
Size: 1323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160527/4c9e0c18/attachment.bin>
More information about the llvm-commits
mailing list