hanchenye-llvm-project/compiler-rt
Dean Michael Berris c561970b27 [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
2018-06-06 06:07:48 +00:00
..
cmake [libFuzzer] Fix a typo in CMake configuration. 2018-05-24 23:55:51 +00:00
docs
include Fix a typo; NFC 2018-05-26 02:28:43 +00:00
lib [XRay][compiler-rt] Refactor recursion guard for Basic and FDR Mode 2018-06-06 06:07:48 +00:00
test [libFuzzer] initial implementation of -data_flow_trace. It parses the data flow trace and prints the summary, but doesn't use the information in any other way yet 2018-06-06 01:23:29 +00:00
unittests Allow compiler-rt test targets to work with multi-config CMake generators 2017-11-13 12:57:54 +00:00
utils [sanitizer] Cleanup sorting functions 2018-05-09 20:42:11 +00:00
www
.arcconfig [compiler-rt] Set up .arcconfig to point to new Diffusion CRT repository 2017-12-06 20:55:32 +00:00
.gitignore Add .pyc files to .gitignore to compiler-rt 2017-07-24 21:51:12 +00:00
CMakeLists.txt [CMake] Support builtins as Clang default rtlib in compiler-rt 2018-05-22 22:58:48 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
README.txt

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================