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

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 10:47:13 PDT 2018


dberris 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};
----------------
jfb wrote:
> 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.
Good catch! Fixed.


https://reviews.llvm.org/D46998





More information about the llvm-commits mailing list