[compiler-rt] r183429 - [lsan] Put SANITIZER_INTERFACE_ATTRIBUTE on LSan interface functions.

Sergey Matveev earthdok at google.com
Thu Jun 6 11:40:55 PDT 2013


Author: smatveev
Date: Thu Jun  6 13:40:55 2013
New Revision: 183429

URL: http://llvm.org/viewvc/llvm-project?rev=183429&view=rev
Log:
[lsan] Put SANITIZER_INTERFACE_ATTRIBUTE on LSan interface functions.

Modified:
    compiler-rt/trunk/lib/asan/asan_allocator2.cc
    compiler-rt/trunk/lib/lsan/lsan_allocator.cc
    compiler-rt/trunk/lib/lsan/lsan_common.cc

Modified: compiler-rt/trunk/lib/asan/asan_allocator2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_allocator2.cc?rev=183429&r1=183428&r2=183429&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_allocator2.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_allocator2.cc Thu Jun  6 13:40:55 2013
@@ -809,6 +809,7 @@ IgnoreObjectResult IgnoreObjectLocked(co
 }  // namespace __lsan
 
 extern "C" {
+SANITIZER_INTERFACE_ATTRIBUTE
 void __lsan_disable() {
   __asan_init();
   __asan::AsanThread *t = __asan::GetCurrentThread();
@@ -816,6 +817,7 @@ void __lsan_disable() {
   t->disable_lsan();
 }
 
+SANITIZER_INTERFACE_ATTRIBUTE
 void __lsan_enable() {
   __asan_init();
   __asan::AsanThread *t = __asan::GetCurrentThread();

Modified: compiler-rt/trunk/lib/lsan/lsan_allocator.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lsan_allocator.cc?rev=183429&r1=183428&r2=183429&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_allocator.cc (original)
+++ compiler-rt/trunk/lib/lsan/lsan_allocator.cc Thu Jun  6 13:40:55 2013
@@ -208,10 +208,12 @@ IgnoreObjectResult IgnoreObjectLocked(co
 }  // namespace __lsan
 
 extern "C" {
+SANITIZER_INTERFACE_ATTRIBUTE
 void __lsan_disable() {
   __lsan::lsan_disabled++;
 }
 
+SANITIZER_INTERFACE_ATTRIBUTE
 void __lsan_enable() {
   if (!__lsan::lsan_disabled) {
     Report("Unmatched call to __lsan_enable().\n");

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=183429&r1=183428&r2=183429&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_common.cc (original)
+++ compiler-rt/trunk/lib/lsan/lsan_common.cc Thu Jun  6 13:40:55 2013
@@ -404,6 +404,7 @@ void LeakReport::PrintSummary() {
 using namespace __lsan;  // NOLINT
 
 extern "C" {
+SANITIZER_INTERFACE_ATTRIBUTE
 void __lsan_ignore_object(const void *p) {
   // Cannot use PointsIntoChunk or LsanMetadata here, since the allocator is not
   // locked.





More information about the llvm-commits mailing list