[PATCH] D46998: [XRay][compiler-rt] Limit reliance on C++ ABI features

JF Bastien via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 09:58:37 PDT 2018


jfb added inline comments.


================
Comment at: compiler-rt/lib/xray/xray_fdr_logging.cc:600
+  // the thread. We use a simple thread_local latch to only allow one on-going
+  // handleArg0 to happen at any given time.
+  RecursionGuard Guard{Running};
----------------
If you want to guard signal handler recursion you have to use an atomic exchange, not the current `if (set) set = true;` pattern you have.


https://reviews.llvm.org/D46998





More information about the llvm-commits mailing list