[compiler-rt] [compiler-rt] Write ASAN/TSAN reports to a global for crash reporting (PR #200526)
Dan Blackwell via llvm-commits
llvm-commits at lists.llvm.org
Sat May 30 02:34:08 PDT 2026
================
@@ -359,6 +402,60 @@ void PrintReport(const ReportDesc *rep) {
DumpProcessMap();
Printf("==================\n");
+# if SANITIZER_APPLE
+ if (common_flags()->crashreporter_global) {
+ InternalMmapVector<llvm_sanitizer_report_payload_stack_v1> stacks;
+ InternalMmapVector<char> descbuf(
+ LLVM_SANITIZER_V1_STACK_DESCRIPTION_MAXLEN);
+ stacks.reserve(4);
+ uptr fault_address = 0, allocation_addr = 0, allocation_size = 0;
+
+ for (uptr i = 0; i < rep->mops.Size(); i++) {
----------------
DanBlackwell wrote:
NIT: I think the style guide would have this as:
```suggestion
for (uptr i = 0, len = rep->mops.Size(); i < len; i++) {
```
https://github.com/llvm/llvm-project/pull/200526
More information about the llvm-commits
mailing list