[compiler-rt] [TSan][compiler-rt] Defer symbolization of Reports to as late as possible (PR #151120)

Thurston Dang via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 29 09:55:39 PDT 2025


================
@@ -324,11 +395,7 @@ void ScopedReportBase::AddLocation(uptr addr, uptr size) {
     AddThread(tctx);
   }
 #endif
-  if (ReportLocation *loc = SymbolizeData(addr)) {
-    loc->suppressable = true;
-    rep_->locs.PushBack(loc);
-    return;
-  }
+  rep_->added_location_addrs.PushBack({addr, rep_->locs.Size()});
----------------
thurstond wrote:

I think if we also added a placeholder value here:
```
rep_->locs.PushBack(nullptr);
```
then `ScopedReportBase::SymbolizeStackElems()` could be greatly simplified: loop through added_location_addrs and overwrite the placeholder values at `rep_->locs[added_loc_addr->locs_idx]`.

https://github.com/llvm/llvm-project/pull/151120


More information about the llvm-commits mailing list