llvm-project/compiler-rt/lib
Kuba Mracek 3ecf9dcaf4 [compiler-rt] Replace forkpty with posix_spawn
On Darwin, we currently use forkpty to communicate with the "atos" symbolizer. There are several problems that fork or forkpty has, e.g. that after fork, interceptors are still active and this sometimes causes crashes or hangs. This is especially problematic for TSan, which uses interceptors for OS-provided locks and mutexes, and even Libc functions use those.

This patch replaces forkpty with posix_spawn. Since posix_spawn doesn't fork (at least on Darwin), the interceptors are not a problem. Additionally, this also fixes a latent threading problem with ptsname (it's unsafe to use this function in multithreaded programs). Yet another benefit is that we'll handle post-fork failures (e.g. sandbox disallows "exec") gracefully now.

Differential Revision: https://reviews.llvm.org/D40032

llvm-svn: 324846
2018-02-11 19:23:42 +00:00
..
BlocksRuntime [compiler-rt] Test commit: remove some trailing white spaces. 2017-08-25 19:36:30 +00:00
asan [scudo] Allow options to be defined at compile time 2018-02-08 16:29:48 +00:00
builtins [builtins] Workaround for infinite recursion in c?zdi2 2018-02-08 11:14:11 +00:00
cfi cfi: Add a blacklist entry for MSVC's std::get_temporary_buffer function. 2018-01-17 01:15:33 +00:00
dfsan Reland "Install resource files into a share/ directory" 2018-01-14 03:43:14 +00:00
esan [esan] Fix compilation of signal handlers 2017-11-10 05:41:13 +00:00
fuzzer [Fuzzer] Use Zircon's public API on Fuchsia 2018-02-07 08:22:58 +00:00
hwasan [Sanitizers] Changes in Hwasan allocator missed in D42198. 2018-01-18 00:23:46 +00:00
interception [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
lsan [lsan] Respect log_path option in standalone LSan 2018-01-22 09:30:27 +00:00
msan [CMake] Remove -stdlib= which is unused when passing -nostdinc++ 2018-02-01 13:57:24 +00:00
profile [NFC] fix trivial typos in comments 2018-01-22 07:51:37 +00:00
safestack Enable SafeStack on NetBSD 2017-08-10 18:40:09 +00:00
sanitizer_common [compiler-rt] Replace forkpty with posix_spawn 2018-02-11 19:23:42 +00:00
scudo [scudo] Allow options to be defined at compile time 2018-02-08 16:29:48 +00:00
stats Support compiler-rt builtins 2017-07-28 03:39:38 +00:00
tsan [scudo] Allow options to be defined at compile time 2018-02-08 16:29:48 +00:00
ubsan [ubsan] Add preinit initializer for ubsan 2018-01-23 19:54:02 +00:00
ubsan_minimal [ubsan-minimal] Add a path for non-POSIX (and bare-metal) use of the library 2017-12-15 17:30:50 +00:00
xray [XRay] Rename Buffer.Buffer to Buffer.Data 2018-02-10 09:07:34 +00:00
CMakeLists.txt [cmake] Add a separate CMake var to control profile runtime 2017-10-02 05:03:55 +00:00