File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -586,6 +586,13 @@ void BaseReport::PrintAddressDescription() const {
586586 untagged_addr - heap.begin , d.Default ());
587587 }
588588
589+ auto announce_by_id = [](u32 thread_id) {
590+ hwasanThreadList ().VisitAllLiveThreads ([&](Thread *t) {
591+ if (thread_id == t->unique_id ())
592+ t->Announce ();
593+ });
594+ };
595+
589596 // Check stack first. If the address is on the stack of a live thread, we
590597 // know it cannot be a heap / global overflow.
591598 for (uptr i = 0 ; i < stack_allocations_count; ++i) {
@@ -598,11 +605,7 @@ void BaseReport::PrintAddressDescription() const {
598605 Printf (" Address %p is located in stack of thread T%zd\n " , untagged_addr,
599606 allocations.thread_id ());
600607 Printf (" %s" , d.Default ());
601- hwasanThreadList ().VisitAllLiveThreads ([&](Thread *t) {
602- if (allocations.thread_id () == t->unique_id ())
603- t->Announce ();
604- });
605-
608+ announce_by_id (allocations.thread_id ());
606609 PrintStackAllocations (allocations.get (), ptr_tag, untagged_addr);
607610 num_descriptions_printed++;
608611 }
You can’t perform that action at this time.
0 commit comments