[compiler-rt] r199304 - [lsan] remove LeakSanitizerIsTurnedOffForTheCurrentProcess (this was a bad idea), leave __lsan_is_turned_off
Kostya Serebryany
kcc at google.com
Wed Jan 15 00:04:21 PST 2014
Author: kcc
Date: Wed Jan 15 02:04:21 2014
New Revision: 199304
URL: http://llvm.org/viewvc/llvm-project?rev=199304&view=rev
Log:
[lsan] remove LeakSanitizerIsTurnedOffForTheCurrentProcess (this was a bad idea), leave __lsan_is_turned_off
Modified:
compiler-rt/trunk/include/sanitizer/lsan_interface.h
compiler-rt/trunk/lib/lsan/lit_tests/TestCases/link_turned_off.cc
compiler-rt/trunk/lib/lsan/lsan_common.cc
compiler-rt/trunk/lib/lsan/lsan_common.h
Modified: compiler-rt/trunk/include/sanitizer/lsan_interface.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/include/sanitizer/lsan_interface.h?rev=199304&r1=199303&r2=199304&view=diff
==============================================================================
--- compiler-rt/trunk/include/sanitizer/lsan_interface.h (original)
+++ compiler-rt/trunk/include/sanitizer/lsan_interface.h Wed Jan 15 02:04:21 2014
@@ -53,11 +53,6 @@ extern "C" {
// for the program it is linked into (if the return value is non-zero). This
// function must be defined as returning a constant value; any behavior beyond
// that is unsupported.
- int LeakSanitizerIsTurnedOffForTheCurrentProcess();
-
- // Same as LeakSanitizerIsTurnedOffForTheCurrentProcess, but deprecated.
- // If both functions are defined only
- // LeakSanitizerIsTurnedOffForTheCurrentProcess is used.
int __lsan_is_turned_off();
// This function may be optionally provided by the user and should return
Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/link_turned_off.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/link_turned_off.cc?rev=199304&r1=199303&r2=199304&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/link_turned_off.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/link_turned_off.cc Wed Jan 15 02:04:21 2014
@@ -9,7 +9,7 @@
int argc_copy;
extern "C" {
-int LeakSanitizerIsTurnedOffForTheCurrentProcess() {
+int __lsan_is_turned_off() {
return (argc_copy == 1);
}
}
Modified: compiler-rt/trunk/lib/lsan/lsan_common.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_common.cc?rev=199304&r1=199303&r2=199304&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_common.cc (original)
+++ compiler-rt/trunk/lib/lsan/lsan_common.cc Wed Jan 15 02:04:21 2014
@@ -423,13 +423,8 @@ void DoLeakCheck() {
static bool already_done;
if (already_done) return;
already_done = true;
- if (&LeakSanitizerIsTurnedOffForTheCurrentProcess) {
- if (LeakSanitizerIsTurnedOffForTheCurrentProcess())
+ if (&__lsan_is_turned_off && __lsan_is_turned_off())
return;
- } else if (&__lsan_is_turned_off) {
- if (__lsan_is_turned_off())
- return;
- }
DoLeakCheckParam param;
param.success = false;
@@ -719,9 +714,5 @@ SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_
int __lsan_is_turned_off() {
return 0;
}
-SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
-int LeakSanitizerIsTurnedOffForTheCurrentProcess() {
- return 0;
-}
#endif
} // extern "C"
Modified: compiler-rt/trunk/lib/lsan/lsan_common.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_common.h?rev=199304&r1=199303&r2=199304&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_common.h (original)
+++ compiler-rt/trunk/lib/lsan/lsan_common.h Wed Jan 15 02:04:21 2014
@@ -199,8 +199,6 @@ class LsanMetadata {
extern "C" {
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
int __lsan_is_turned_off();
-SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
-int LeakSanitizerIsTurnedOffForTheCurrentProcess();
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
const char *__lsan_default_suppressions();
More information about the llvm-commits
mailing list