[compiler-rt] [rtsan] Only print out unique stack traces (PR #110028)

Chris Apple via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 12:43:43 PDT 2024


================
@@ -49,7 +50,21 @@ static auto OnViolationAction(DiagnosticsInfo info) {
   return [info]() {
     IncrementTotalErrorCount();
 
-    PrintDiagnostics(info);
+    BufferedStackTrace stack;
+    stack.Unwind(info.pc, info.bp, nullptr,
+                 /*request_fast*/ true);
----------------
cjappl wrote:

I see. 

Based on my understanding of the underlying implementation this is just a "pleasant request" to fast unwind, but it will be overridden when necessary (the platform does not support it?).

In this case, we are unwinding the stack, but it is not necessarily fatal, so the existing flags `fast_unwind_on_fatal` and `fast_unwind_on_malloc` seem inappropriate - should we make a new flag for this? or default to requesting "slow" unwinding?

This is definitely me at the end of my experience so I am happy to have any advice.

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


More information about the llvm-commits mailing list