25
25
#include " sanitizer_common/sanitizer_thread_registry.h"
26
26
#include " sanitizer_common/sanitizer_tls_get_addr.h"
27
27
28
- extern " C" const char *__lsan_current_stage = " unknown" ;
29
-
30
28
#if CAN_SANITIZE_LEAKS
31
29
namespace __lsan {
32
30
@@ -362,7 +360,6 @@ static void FloodFillTag(Frontier *frontier, ChunkTag tag) {
362
360
// ForEachChunk callback. If the chunk is marked as leaked, marks all chunks
363
361
// which are reachable from it as indirectly leaked.
364
362
static void MarkIndirectlyLeakedCb (uptr chunk, void *arg) {
365
- __lsan_current_stage = " MarkIndirectlyLeakedCb" ;
366
363
chunk = GetUserBegin (chunk);
367
364
LsanMetadata m (chunk);
368
365
if (m.allocated () && m.tag () != kReachable ) {
@@ -375,7 +372,6 @@ static void MarkIndirectlyLeakedCb(uptr chunk, void *arg) {
375
372
// frontier.
376
373
static void CollectIgnoredCb (uptr chunk, void *arg) {
377
374
CHECK (arg);
378
- __lsan_current_stage = " CollectIgnoredCb" ;
379
375
chunk = GetUserBegin (chunk);
380
376
LsanMetadata m (chunk);
381
377
if (m.allocated () && m.tag () == kIgnored ) {
@@ -405,7 +401,6 @@ struct InvalidPCParam {
405
401
static void MarkInvalidPCCb (uptr chunk, void *arg) {
406
402
CHECK (arg);
407
403
InvalidPCParam *param = reinterpret_cast <InvalidPCParam *>(arg);
408
- __lsan_current_stage = " MarkInvalidPCCb" ;
409
404
chunk = GetUserBegin (chunk);
410
405
LsanMetadata m (chunk);
411
406
if (m.allocated () && m.tag () != kReachable && m.tag () != kIgnored ) {
@@ -481,7 +476,6 @@ static void ClassifyAllChunks(SuspendedThreadsList const &suspended_threads,
481
476
// ForEachChunk callback. Resets the tags to pre-leak-check state.
482
477
static void ResetTagsCb (uptr chunk, void *arg) {
483
478
(void )arg;
484
- __lsan_current_stage = " ResetTagsCb" ;
485
479
chunk = GetUserBegin (chunk);
486
480
LsanMetadata m (chunk);
487
481
if (m.allocated () && m.tag () != kIgnored )
@@ -498,7 +492,6 @@ static void PrintStackTraceById(u32 stack_trace_id) {
498
492
static void CollectLeaksCb (uptr chunk, void *arg) {
499
493
CHECK (arg);
500
494
LeakReport *leak_report = reinterpret_cast <LeakReport *>(arg);
501
- __lsan_current_stage = " CollectLeaksCb" ;
502
495
chunk = GetUserBegin (chunk);
503
496
LsanMetadata m (chunk);
504
497
if (!m.allocated ()) return ;
0 commit comments