"llvm/git@repo.hca.bsc.es:rferrer/llvm-epi-0.8.git" did not exist on "f0221477904e642de8ab395be19c0756bd0c6a45"
[XRay][compiler-rt] Refactor recursion guard for Basic and FDR Mode
Summary: This change extracts the recursion guard implementation from FDR Mode and updates it to do the following: - Do the atomic operation correctly to be signal-handler safe. - Make it usable in both FDR and Basic Modes. Before this change, the recursion guard relied on an unsynchronised read and write on a volatile thread-local. A signal handler could then run in between the read and the write, and then be able to run instrumented code as part of the signal handling. Using an atomic exchange instead fixes that by doing a proper mutual exclusion even in the presence of signal handling. Reviewers: kpw, eizan, jfb Reviewed By: eizan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D47696 llvm-svn: 334064
Loading
Please register or sign in to comment