diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-07-16 11:22:46 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-08-30 06:36:41 +0200 |
| commit | ac2050609055d76a58b058b064f0b0c4d54e2faa (patch) | |
| tree | 54855b2bde3e1eed89d870251b044e93972f6c5c /lib/libtsan/tsan_rtl_report.cpp | |
| parent | 85438e75e04b356ca319051c33e0987a9958ad4a (diff) | |
| download | zig-ac2050609055d76a58b058b064f0b0c4d54e2faa.tar.gz zig-ac2050609055d76a58b058b064f0b0c4d54e2faa.zip | |
libtsan: update to LLVM 21
Diffstat (limited to 'lib/libtsan/tsan_rtl_report.cpp')
| -rw-r--r-- | lib/libtsan/tsan_rtl_report.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libtsan/tsan_rtl_report.cpp b/lib/libtsan/tsan_rtl_report.cpp index 51a98e2f2d..0820bf1ade 100644 --- a/lib/libtsan/tsan_rtl_report.cpp +++ b/lib/libtsan/tsan_rtl_report.cpp @@ -846,7 +846,16 @@ ALWAYS_INLINE USED void PrintCurrentStack(uptr pc, bool fast) { ptrace->trace_buffer[i] = ptrace->trace_buffer[ptrace->size - i - 1]; ptrace->trace_buffer[ptrace->size - i - 1] = tmp; } - PrintStack(SymbolizeStack(*ptrace)); + + if (ready_to_symbolize) { + PrintStack(SymbolizeStack(*ptrace)); + } else { + Printf( + "WARNING: PrintCurrentStack() has been called too early, before " + "symbolization is possible. Printing unsymbolized stack trace:\n"); + for (unsigned int i = 0; i < ptrace->size; i++) + Printf(" #%u: 0x%zx\n", i, ptrace->trace[i]); + } #endif } |
