[compiler-rt] r183748 - [lsan] Harmonized some naming inconsistencies.

Sergey Matveev earthdok at google.com
Tue Jun 11 08:26:20 PDT 2013


Author: smatveev
Date: Tue Jun 11 10:26:20 2013
New Revision: 183748

URL: http://llvm.org/viewvc/llvm-project?rev=183748&view=rev
Log:
[lsan] Harmonized some naming inconsistencies.

Modified:
    compiler-rt/trunk/lib/asan/asan_allocator2.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/disabler.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/large_allocation_leak.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/stale_stack_leak.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_globals_initialized.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_globals_uninitialized.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_registers.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_stacks.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_stacks_threaded.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_dynamic.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_dynamic.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_static.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_static.cc
    compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_unaligned.cc
    compiler-rt/trunk/lib/lsan/lsan_allocator.cc
    compiler-rt/trunk/lib/lsan/lsan_common.cc
    compiler-rt/trunk/lib/lsan/lsan_common.h

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=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_allocator2.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_allocator2.cc Tue Jun 11 10:26:20 2013
@@ -421,7 +421,7 @@ static void *Allocate(uptr size, uptr al
     REAL(memset)(res, fl.malloc_fill_byte, fill_size);
   }
   if (t && t->lsan_disabled())
-    m->lsan_tag = __lsan::kSuppressed;
+    m->lsan_tag = __lsan::kIgnored;
   else
     m->lsan_tag = __lsan::kDirectlyLeaked;
   // Must be the last mutation of metadata in this function.
@@ -781,9 +781,9 @@ IgnoreObjectResult IgnoreObjectLocked(co
   __asan::AsanChunk *m = __asan::GetAsanChunkByAddr(addr);
   if (!m) return kIgnoreObjectInvalid;
   if ((m->chunk_state == __asan::CHUNK_ALLOCATED) && m->AddrIsInside(addr)) {
-    if (m->lsan_tag == kSuppressed)
+    if (m->lsan_tag == kIgnored)
       return kIgnoreObjectAlreadyIgnored;
-    m->lsan_tag = __lsan::kSuppressed;
+    m->lsan_tag = __lsan::kIgnored;
     return kIgnoreObjectSuccess;
   } else {
     return kIgnoreObjectInvalid;

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/disabler.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/disabler.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/disabler.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/disabler.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test for ScopedDisabler.
-// RUN: LSAN_BASE="report_blocks=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0"
+// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0"
 // RUN: %clangxx_lsan -I %p/../../../../include %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
 

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/ignore_object.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test for __lsan_ignore_object().
-// RUN: LSAN_BASE="report_blocks=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0:verbosity=2"
+// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=0:use_globals=0:use_tls=0:verbosity=2"
 // RUN: %clangxx_lsan -I %p/../../../../include %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
 
@@ -15,11 +15,11 @@ int main() {
     __lsan::ScopedDisabler d;
     malloc(1);
   }
-  // Explicitly ignored block.
+  // Explicitly ignored object.
   void **p = new void *;
-  // Transitively ignored block.
+  // Transitively ignored object.
   *p = malloc(666);
-  // Non-ignored block.
+  // Non-ignored object.
   volatile void *q = malloc(1337);
   fprintf(stderr, "Test alloc: %p.\n", p);
   __lsan_ignore_object(p);

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/large_allocation_leak.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/large_allocation_leak.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/large_allocation_leak.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/large_allocation_leak.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test that LargeMmapAllocator's chunks aren't reachable via some internal data structure.
-// RUN: LSAN_BASE="report_blocks=1:use_stacks=0:use_registers=0"
+// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
 // RUN: %clangxx_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
 
@@ -14,5 +14,5 @@ int main() {
 }
 // CHECK: Test alloc: [[ADDR:.*]].
 // CHECK: LeakSanitizer: detected memory leaks
-// CHECK: Directly leaked 33554432 byte block at [[ADDR]]
+// CHECK: Directly leaked 33554432 byte object at [[ADDR]]
 // CHECK: SUMMARY: LeakSanitizer:

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/stale_stack_leak.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/stale_stack_leak.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/stale_stack_leak.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/stale_stack_leak.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test that out-of-scope local variables are ignored by LSan.
-// RUN: LSAN_BASE="report_blocks=1:use_registers=0:use_stacks=1"
+// RUN: LSAN_BASE="report_objects=1:use_registers=0:use_stacks=1"
 // RUN: %clangxx_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE":exitcode=0" %t 2>&1 | FileCheck --check-prefix=CHECK-sanity %s
@@ -37,6 +37,6 @@ void ConfirmPointerHasSurvived() {
 // CHECK: Test alloc: [[ADDR:.*]].
 // CHECK-sanity: Test alloc: [[ADDR:.*]].
 // CHECK: LeakSanitizer: detected memory leaks
-// CHECK: Directly leaked 1337 byte block at [[ADDR]]
+// CHECK: Directly leaked 1337 byte object at [[ADDR]]
 // CHECK: SUMMARY: LeakSanitizer:
 // CHECK-sanity: Value after LSan: [[ADDR]].

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_globals_initialized.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_globals_initialized.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_globals_initialized.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_globals_initialized.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test that initialized globals are included in the root set.
-// RUN: LSAN_BASE="report_blocks=1:use_stacks=0:use_registers=0"
+// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
 // RUN: %clangxx_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=1" %t 2>&1
@@ -17,5 +17,5 @@ int main() {
 }
 // CHECK: Test alloc: [[ADDR:.*]].
 // CHECK: LeakSanitizer: detected memory leaks
-// CHECK: Directly leaked 1337 byte block at [[ADDR]]
+// CHECK: Directly leaked 1337 byte object at [[ADDR]]
 // CHECK: SUMMARY: LeakSanitizer:

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_globals_uninitialized.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_globals_uninitialized.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_globals_uninitialized.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_globals_uninitialized.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test that uninitialized globals are included in the root set.
-// RUN: LSAN_BASE="report_blocks=1:use_stacks=0:use_registers=0"
+// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
 // RUN: %clangxx_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=0" %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_globals=1" %t 2>&1
@@ -17,5 +17,5 @@ int main() {
 }
 // CHECK: Test alloc: [[ADDR:.*]].
 // CHECK: LeakSanitizer: detected memory leaks
-// CHECK: Directly leaked 1337 byte block at [[ADDR]]
+// CHECK: Directly leaked 1337 byte object at [[ADDR]]
 // CHECK: SUMMARY: LeakSanitizer:

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_registers.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_registers.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_registers.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_registers.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test that registers of running threads are included in the root set.
-// RUN: LSAN_BASE="report_blocks=1:use_stacks=0"
+// RUN: LSAN_BASE="report_objects=1:use_stacks=0"
 // RUN: %clangxx_lsan -pthread %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_registers=0" %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_registers=1" %t 2>&1
@@ -47,5 +47,5 @@ int main() {
 }
 // CHECK: Test alloc: [[ADDR:.*]].
 // CHECK: LeakSanitizer: detected memory leaks
-// CHECK: Directly leaked 1337 byte block at [[ADDR]]
+// CHECK: Directly leaked 1337 byte object at [[ADDR]]
 // CHECK: SUMMARY: LeakSanitizer:

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_stacks.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_stacks.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_stacks.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_stacks.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test that stack of main thread is included in the root set.
-// RUN: LSAN_BASE="report_blocks=1:use_registers=0"
+// RUN: LSAN_BASE="report_objects=1:use_registers=0"
 // RUN: %clangxx_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=1" %t 2>&1
@@ -16,5 +16,5 @@ int main() {
 }
 // CHECK: Test alloc: [[ADDR:.*]].
 // CHECK: LeakSanitizer: detected memory leaks
-// CHECK: Directly leaked 1337 byte block at [[ADDR]]
+// CHECK: Directly leaked 1337 byte object at [[ADDR]]
 // CHECK: SUMMARY: LeakSanitizer:

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_stacks_threaded.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_stacks_threaded.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_stacks_threaded.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_stacks_threaded.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test that stacks of non-main threads are included in the root set.
-// RUN: LSAN_BASE="report_blocks=1:use_registers=0"
+// RUN: LSAN_BASE="report_objects=1:use_registers=0"
 // RUN: %clangxx_lsan -pthread %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=0" %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_stacks=1" %t 2>&1
@@ -32,5 +32,5 @@ int main() {
 }
 // CHECK: Test alloc: [[ADDR:.*]].
 // CHECK: LeakSanitizer: detected memory leaks
-// CHECK: Directly leaked 1337 byte block at [[ADDR]]
+// CHECK: Directly leaked 1337 byte object at [[ADDR]]
 // CHECK: SUMMARY: LeakSanitizer:

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_dynamic.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_dynamic.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_dynamic.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_dynamic.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test that dynamically allocated TLS space is included in the root set.
-// RUN: LSAN_BASE="report_blocks=1:use_stacks=0:use_registers=0"
+// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
 // RUN: %clangxx %p/SharedLibs/huge_tls_lib_so.cc -fPIC -shared -o %t-so.so
 // RUN: %clangxx_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" %t 2>&1 | FileCheck %s
@@ -29,5 +29,5 @@ int main(int argc, char *argv[]) {
 }
 // CHECK: Test alloc: [[ADDR:.*]].
 // CHECK: LeakSanitizer: detected memory leaks
-// CHECK: leaked 1337 byte block at [[ADDR]]
+// CHECK: leaked 1337 byte object at [[ADDR]]
 // CHECK: SUMMARY: LeakSanitizer:

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_dynamic.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_dynamic.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_dynamic.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_dynamic.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test that dynamically allocated thread-specific storage is included in the root set.
-// RUN: LSAN_BASE="report_blocks=1:use_stacks=0:use_registers=0"
+// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
 // RUN: %clangxx_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1
@@ -33,5 +33,5 @@ int main() {
 }
 // CHECK: Test alloc: [[ADDR:.*]].
 // CHECK: LeakSanitizer: detected memory leaks
-// CHECK: leaked 1337 byte block at [[ADDR]]
+// CHECK: leaked 1337 byte object at [[ADDR]]
 // CHECK: SUMMARY: LeakSanitizer:

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_static.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_static.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_static.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_static.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test that statically allocated thread-specific storage is included in the root set.
-// RUN: LSAN_BASE="report_blocks=1:use_stacks=0:use_registers=0"
+// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
 // RUN: %clangxx_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1
@@ -27,5 +27,5 @@ int main() {
 }
 // CHECK: Test alloc: [[ADDR:.*]].
 // CHECK: LeakSanitizer: detected memory leaks
-// CHECK: Directly leaked 1337 byte block at [[ADDR]]
+// CHECK: Directly leaked 1337 byte object at [[ADDR]]
 // CHECK: SUMMARY: LeakSanitizer:

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_static.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_static.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_static.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_tls_static.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test that statically allocated TLS space is included in the root set.
-// RUN: LSAN_BASE="report_blocks=1:use_stacks=0:use_registers=0"
+// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
 // RUN: %clangxx_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=0" %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_tls=1" %t 2>&1
@@ -17,5 +17,5 @@ int main() {
 }
 // CHECK: Test alloc: [[ADDR:.*]].
 // CHECK: LeakSanitizer: detected memory leaks
-// CHECK: Directly leaked 1337 byte block at [[ADDR]]
+// CHECK: Directly leaked 1337 byte object at [[ADDR]]
 // CHECK: SUMMARY: LeakSanitizer:

Modified: compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_unaligned.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_unaligned.cc?rev=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_unaligned.cc (original)
+++ compiler-rt/trunk/lib/lsan/lit_tests/TestCases/use_unaligned.cc Tue Jun 11 10:26:20 2013
@@ -1,5 +1,5 @@
 // Test that unaligned pointers are detected correctly.
-// RUN: LSAN_BASE="report_blocks=1:use_stacks=0:use_registers=0"
+// RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0"
 // RUN: %clangxx_lsan %s -o %t
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_unaligned=0" %t 2>&1 | FileCheck %s
 // RUN: LSAN_OPTIONS=$LSAN_BASE:"use_unaligned=1" %t 2>&1
@@ -19,5 +19,5 @@ int main() {
 }
 // CHECK: Test alloc: [[ADDR:.*]].
 // CHECK: LeakSanitizer: detected memory leaks
-// CHECK: Directly leaked 1337 byte block at [[ADDR]]
+// CHECK: Directly leaked 1337 byte object at [[ADDR]]
 // CHECK: SUMMARY: LeakSanitizer:

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=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_allocator.cc (original)
+++ compiler-rt/trunk/lib/lsan/lsan_allocator.cc Tue Jun 11 10:26:20 2013
@@ -63,7 +63,7 @@ static void RegisterAllocation(const Sta
   if (!p) return;
   ChunkMetadata *m = Metadata(p);
   CHECK(m);
-  m->tag = lsan_disabled ? kSuppressed : kDirectlyLeaked;
+  m->tag = lsan_disabled ? kIgnored : kDirectlyLeaked;
   m->stack_trace_id = StackDepotPut(stack.trace, stack.size);
   m->requested_size = size;
   atomic_store((atomic_uint8_t*)m, 1, memory_order_relaxed);
@@ -197,9 +197,9 @@ IgnoreObjectResult IgnoreObjectLocked(co
   ChunkMetadata *m = Metadata(chunk);
   CHECK(m);
   if (m->allocated && (uptr)p < (uptr)chunk + m->requested_size) {
-    if (m->tag == kSuppressed)
+    if (m->tag == kIgnored)
       return kIgnoreObjectAlreadyIgnored;
-    m->tag = kSuppressed;
+    m->tag = kIgnored;
     return kIgnoreObjectSuccess;
   } else {
     return kIgnoreObjectInvalid;

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=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_common.cc (original)
+++ compiler-rt/trunk/lib/lsan/lsan_common.cc Tue Jun 11 10:26:20 2013
@@ -31,7 +31,7 @@ Flags lsan_flags;
 static void InitializeFlags() {
   Flags *f = flags();
   // Default values.
-  f->report_blocks = false;
+  f->report_objects = false;
   f->resolution = 0;
   f->max_leaks = 0;
   f->exitcode = 23;
@@ -51,7 +51,7 @@ static void InitializeFlags() {
     ParseFlag(options, &f->use_stacks, "use_stacks");
     ParseFlag(options, &f->use_tls, "use_tls");
     ParseFlag(options, &f->use_unaligned, "use_unaligned");
-    ParseFlag(options, &f->report_blocks, "report_blocks");
+    ParseFlag(options, &f->report_objects, "report_objects");
     ParseFlag(options, &f->resolution, "resolution");
     CHECK_GE(&f->resolution, 0);
     ParseFlag(options, &f->max_leaks, "max_leaks");
@@ -84,7 +84,7 @@ static inline bool CanBeAHeapPointer(upt
 // Scan the memory range, looking for byte patterns that point into allocator
 // chunks. Mark those chunks with tag and add them to the frontier.
 // There are two usage modes for this function: finding reachable or suppressed
-// chunks (tag = kReachable or kSuppressed) and finding indirectly leaked chunks
+// chunks (tag = kReachable or kIgnored) and finding indirectly leaked chunks
 // (tag = kIndirectlyLeaked). In the second case, there's no flood fill,
 // so frontier = 0.
 void ScanRangeForPointers(uptr begin, uptr end, InternalVector<uptr> *frontier,
@@ -103,7 +103,7 @@ void ScanRangeForPointers(uptr begin, up
     LsanMetadata m(chunk);
     // Reachable beats suppressed beats leaked.
     if (m.tag() == kReachable) continue;
-    if (m.tag() == kSuppressed && tag != kReachable) continue;
+    if (m.tag() == kIgnored && tag != kReachable) continue;
     m.set_tag(tag);
     if (flags()->log_pointers)
       Report("%p: found %p pointing into chunk %p-%p of size %llu.\n", pp, p,
@@ -207,7 +207,7 @@ void MarkIndirectlyLeakedCb::operator()(
 void CollectSuppressedCb::operator()(void *p) const {
   p = GetUserBegin(p);
   LsanMetadata m(p);
-  if (m.allocated() && m.tag() == kSuppressed)
+  if (m.allocated() && m.tag() == kIgnored)
     frontier_->push_back(reinterpret_cast<uptr>(p));
 }
 
@@ -227,15 +227,15 @@ static void ClassifyAllChunks(SuspendedT
   FloodFillTag(&frontier, kReachable);
 
   if (flags()->log_pointers)
-    Report("Scanning suppressed blocks.\n");
+    Report("Scanning ignored chunks.\n");
   CHECK_EQ(0, frontier.size());
   ForEachChunk(CollectSuppressedCb(&frontier));
-  FloodFillTag(&frontier, kSuppressed);
+  FloodFillTag(&frontier, kIgnored);
 
   // Iterate over leaked chunks and mark those that are reachable from other
   // leaked chunks.
   if (flags()->log_pointers)
-    Report("Scanning leaked blocks.\n");
+    Report("Scanning leaked chunks.\n");
   ForEachChunk(MarkIndirectlyLeakedCb());
 }
 
@@ -274,14 +274,14 @@ void PrintLeakedCb::operator()(void *p)
   LsanMetadata m(p);
   if (!m.allocated()) return;
   if (m.tag() == kDirectlyLeaked || m.tag() == kIndirectlyLeaked) {
-    Printf("%s leaked %llu byte block at %p\n",
+    Printf("%s leaked %llu byte object at %p\n",
            m.tag() == kDirectlyLeaked ? "Directly" : "Indirectly",
            m.requested_size(), p);
   }
 }
 
 static void PrintLeaked() {
-  Printf("Reporting individual blocks:\n");
+  Printf("Reporting individual objects:\n");
   Printf("============================\n");
   ForEachChunk(PrintLeakedCb());
   Printf("\n");
@@ -308,7 +308,7 @@ static void DoLeakCheckCallback(const Su
   Printf("=================================================================\n");
   Report("ERROR: LeakSanitizer: detected memory leaks\n");
   leak_report.PrintLargest(flags()->max_leaks);
-  if (flags()->report_blocks)
+  if (flags()->report_objects)
     PrintLeaked();
   leak_report.PrintSummary();
   Printf("\n");

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=183748&r1=183747&r2=183748&view=diff
==============================================================================
--- compiler-rt/trunk/lib/lsan/lsan_common.h (original)
+++ compiler-rt/trunk/lib/lsan/lsan_common.h Tue Jun 11 10:26:20 2013
@@ -33,7 +33,7 @@ enum ChunkTag {
   kDirectlyLeaked = 0,  // default
   kIndirectlyLeaked = 1,
   kReachable = 2,
-  kSuppressed = 3
+  kIgnored = 3
 };
 
 struct Flags {
@@ -41,9 +41,9 @@ struct Flags {
     return use_unaligned ? 1 : sizeof(uptr);
   }
 
-  // Print addresses of leaked blocks after main leak report.
-  bool report_blocks;
-  // Aggregate two blocks into one leak if this many stack frames match. If
+  // Print addresses of leaked objects after main leak report.
+  bool report_objects;
+  // Aggregate two objects into one leak if this many stack frames match. If
   // zero, the entire stack trace must match.
   int resolution;
   // The number of leaks reported.
@@ -146,7 +146,7 @@ class MarkIndirectlyLeakedCb {
   void operator()(void *p) const;
 };
 
-// Finds all chunk marked as kSuppressed and adds their addresses to frontier.
+// Finds all chunk marked as kIgnored and adds their addresses to frontier.
 class CollectSuppressedCb {
  public:
   explicit CollectSuppressedCb(InternalVector<uptr> *frontier)





More information about the llvm-commits mailing list