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

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 16:49:52 PDT 2024


================
@@ -0,0 +1,37 @@
+// RUN: %clangxx -fsanitize=realtime %s -o %t
+// RUN: env RTSAN_OPTIONS="halt_on_error=false,print_stats_on_exit=true" %run %t 2>&1 | FileCheck %s
+// RUN: env RTSAN_OPTIONS="halt_on_error=false" %run %t 2>&1 | grep "==ERROR: RealtimeSanitizer:" | wc -l | awk '{exit $1 != 4}'
----------------
ilovepi wrote:

I believe CHECK-COUNT is the way you normally do this: https://llvm.org/docs/CommandGuide/FileCheck.html#the-check-count-directive, but I don’t have a strong preference on that.  In either case the check seems brittle.  I don’t have a better solution off the top of my head though. 

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


More information about the llvm-commits mailing list