[compiler-rt] [rtsan] Add exit statistics (PR #109885)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 17:49:53 PDT 2024


================
@@ -62,6 +69,9 @@ SANITIZER_INTERFACE_ATTRIBUTE void __rtsan_init() {
   InitializeFlags();
   InitializeInterceptors();
 
+  if (flags().print_stats_on_exit)
+    Atexit(RtsanAtexit);
----------------
fmayer wrote:

I would just register `PrintStatisticsSummary` directly, if you want this to be under the `print_stats_on_exit` flag. Otherwise I would check the flag in `RtsanAtexit`

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


More information about the llvm-commits mailing list