diff options
author | Sergey Matveev <earthdok@google.com> | 2013-06-11 15:26:20 +0000 |
---|---|---|
committer | Sergey Matveev <earthdok@google.com> | 2013-06-11 15:26:20 +0000 |
commit | b3b46dad13a2111a51fb1a67f36c8b633410e9b7 (patch) | |
tree | 8aee36ceae0de02d2a804b17af2349c5125611b9 | |
parent | e0c45610e138c9e0b518189b7fa286f4b7ee6474 (diff) | |
download | compiler-rt-b3b46dad13a2111a51fb1a67f36c8b633410e9b7.tar.gz compiler-rt-b3b46dad13a2111a51fb1a67f36c8b633410e9b7.tar.bz2 compiler-rt-b3b46dad13a2111a51fb1a67f36c8b633410e9b7.tar.xz |
[lsan] Harmonized some naming inconsistencies.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183748 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed, 51 insertions, 51 deletions
diff --git a/lib/asan/asan_allocator2.cc b/lib/asan/asan_allocator2.cc index 4b1b643d..610ca4db 100644 --- a/lib/asan/asan_allocator2.cc +++ b/lib/asan/asan_allocator2.cc @@ -421,7 +421,7 @@ static void *Allocate(uptr size, uptr alignment, StackTrace *stack, 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(const void *p) { __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; diff --git a/lib/lsan/lit_tests/TestCases/disabler.cc b/lib/lsan/lit_tests/TestCases/disabler.cc index 66ed8464..40c17dd7 100644 --- a/lib/lsan/lit_tests/TestCases/disabler.cc +++ b/lib/lsan/lit_tests/TestCases/disabler.cc @@ -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 diff --git a/lib/lsan/lit_tests/TestCases/ignore_object.cc b/lib/lsan/lit_tests/TestCases/ignore_object.cc index bef247ac..5ad59d0c 100644 --- a/lib/lsan/lit_tests/TestCases/ignore_object.cc +++ b/lib/lsan/lit_tests/TestCases/ignore_object.cc @@ -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); diff --git a/lib/lsan/lit_tests/TestCases/large_allocation_leak.cc b/lib/lsan/lit_tests/TestCases/large_allocation_leak.cc index 6db841ee..1379e6a5 100644 --- a/lib/lsan/lit_tests/TestCases/large_allocation_leak.cc +++ b/lib/lsan/lit_tests/TestCases/large_allocation_leak.cc @@ -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: diff --git a/lib/lsan/lit_tests/TestCases/stale_stack_leak.cc b/lib/lsan/lit_tests/TestCases/stale_stack_leak.cc index 5d57082c..6088e2ee 100644 --- a/lib/lsan/lit_tests/TestCases/stale_stack_leak.cc +++ b/lib/lsan/lit_tests/TestCases/stale_stack_leak.cc @@ -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]]. diff --git a/lib/lsan/lit_tests/TestCases/use_globals_initialized.cc b/lib/lsan/lit_tests/TestCases/use_globals_initialized.cc index 48e50b5d..67baa29b 100644 --- a/lib/lsan/lit_tests/TestCases/use_globals_initialized.cc +++ b/lib/lsan/lit_tests/TestCases/use_globals_initialized.cc @@ -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: diff --git a/lib/lsan/lit_tests/TestCases/use_globals_uninitialized.cc b/lib/lsan/lit_tests/TestCases/use_globals_uninitialized.cc index d3831286..8ef30280 100644 --- a/lib/lsan/lit_tests/TestCases/use_globals_uninitialized.cc +++ b/lib/lsan/lit_tests/TestCases/use_globals_uninitialized.cc @@ -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: diff --git a/lib/lsan/lit_tests/TestCases/use_registers.cc b/lib/lsan/lit_tests/TestCases/use_registers.cc index 4b29a847..71d7c9b5 100644 --- a/lib/lsan/lit_tests/TestCases/use_registers.cc +++ b/lib/lsan/lit_tests/TestCases/use_registers.cc @@ -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: diff --git a/lib/lsan/lit_tests/TestCases/use_stacks.cc b/lib/lsan/lit_tests/TestCases/use_stacks.cc index e06a7a47..86eef205 100644 --- a/lib/lsan/lit_tests/TestCases/use_stacks.cc +++ b/lib/lsan/lit_tests/TestCases/use_stacks.cc @@ -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: diff --git a/lib/lsan/lit_tests/TestCases/use_stacks_threaded.cc b/lib/lsan/lit_tests/TestCases/use_stacks_threaded.cc index efce855b..292b4bbf 100644 --- a/lib/lsan/lit_tests/TestCases/use_stacks_threaded.cc +++ b/lib/lsan/lit_tests/TestCases/use_stacks_threaded.cc @@ -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: diff --git a/lib/lsan/lit_tests/TestCases/use_tls_dynamic.cc b/lib/lsan/lit_tests/TestCases/use_tls_dynamic.cc index c97a1ea9..5659a2db 100644 --- a/lib/lsan/lit_tests/TestCases/use_tls_dynamic.cc +++ b/lib/lsan/lit_tests/TestCases/use_tls_dynamic.cc @@ -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: diff --git a/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_dynamic.cc b/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_dynamic.cc index a8fd061d..1a6b10c8 100644 --- a/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_dynamic.cc +++ b/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_dynamic.cc @@ -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: diff --git a/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_static.cc b/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_static.cc index b28406c5..2322a0d5 100644 --- a/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_static.cc +++ b/lib/lsan/lit_tests/TestCases/use_tls_pthread_specific_static.cc @@ -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: diff --git a/lib/lsan/lit_tests/TestCases/use_tls_static.cc b/lib/lsan/lit_tests/TestCases/use_tls_static.cc index a4d12f8a..2dc69293 100644 --- a/lib/lsan/lit_tests/TestCases/use_tls_static.cc +++ b/lib/lsan/lit_tests/TestCases/use_tls_static.cc @@ -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: diff --git a/lib/lsan/lit_tests/TestCases/use_unaligned.cc b/lib/lsan/lit_tests/TestCases/use_unaligned.cc index 75b90d60..738f737f 100644 --- a/lib/lsan/lit_tests/TestCases/use_unaligned.cc +++ b/lib/lsan/lit_tests/TestCases/use_unaligned.cc @@ -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: diff --git a/lib/lsan/lsan_allocator.cc b/lib/lsan/lsan_allocator.cc index 71d361eb..08b8fbd0 100644 --- a/lib/lsan/lsan_allocator.cc +++ b/lib/lsan/lsan_allocator.cc @@ -63,7 +63,7 @@ static void RegisterAllocation(const StackTrace &stack, void *p, uptr size) { 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(const void *p) { 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; diff --git a/lib/lsan/lsan_common.cc b/lib/lsan/lsan_common.cc index b78bbc36..c6869949 100644 --- a/lib/lsan/lsan_common.cc +++ b/lib/lsan/lsan_common.cc @@ -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(uptr p) { // 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, uptr end, InternalVector<uptr> *frontier, 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 *p) const { 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(SuspendedThreadsList const &suspended_threads) { 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) const { 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 SuspendedThreadsList &suspended_threads, 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"); diff --git a/lib/lsan/lsan_common.h b/lib/lsan/lsan_common.h index 4cd6082b..9ac2946c 100644 --- a/lib/lsan/lsan_common.h +++ b/lib/lsan/lsan_common.h @@ -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) |