llvm-project/compiler-rt/test
Julian Lettner 399408a92f [sanitizer_common] Replace forkpty with posix_spawn on Darwin
On Darwin, we currently use forkpty to communicate with the "atos"
symbolizer. There are several problems that fork[pty] 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 on Darwin. Since
posix_spawn doesn't fork (at least on Darwin), the interceptors are not
a problem. Another benefit is that we'll handle post-fork failures (e.g.
sandbox disallows "exec") gracefully now.

Related revisions and previous attempts that were blocked by or had to
be revered due to test failures:
https://reviews.llvm.org/D48451
https://reviews.llvm.org/D40032

Reviewed By: kubamracek

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

llvm-svn: 368947
2019-08-15 00:18:55 +00:00
..
BlocksRuntime Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
asan [sanitizer_common] Replace forkpty with posix_spawn on Darwin 2019-08-15 00:18:55 +00:00
builtins compiler-rt: Remove .cc from all lit config files 2019-08-05 19:25:35 +00:00
cfi [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.* 2019-06-27 20:56:04 +00:00
crt compiler-rt: Remove .cc from all lit config files 2019-08-05 19:25:35 +00:00
dfsan compiler-rt: Rename .cc file in test/dfsan to cpp 2019-08-05 13:19:28 +00:00
fuzzer [libFuzzer] Disable fork.test on AArch64 2019-07-15 11:33:41 +00:00
gwp_asan compiler-rt: Remove .cc from all lit config files 2019-08-05 19:25:35 +00:00
hwasan Add LLD as a requirement for hwasan tests because of change in r368111. 2019-08-08 01:08:22 +00:00
interception [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.* 2019-06-27 20:56:04 +00:00
lsan compiler-rt: Remove .cc from all lit config files 2019-08-05 19:25:35 +00:00
msan compiler-rt: Remove .cc from all lit config files 2019-08-05 19:25:35 +00:00
profile compiler-rt: Rename remaining cc files in test/profile to cpp 2019-08-05 13:42:31 +00:00
safestack compiler-rt: Remove .cc from all lit config files 2019-08-05 19:25:35 +00:00
sanitizer_common [Sanitizer][Darwin] Add interceptor for malloc_zone_from_ptr 2019-08-09 21:46:32 +00:00
scudo compiler-rt: Remove .cc from all lit config files 2019-08-05 19:25:35 +00:00
shadowcallstack compiler-rt: Remove .cc from all lit config files 2019-08-05 19:25:35 +00:00
tsan [TSan] Fix test failing on Linux 2019-08-13 00:37:48 +00:00
ubsan compiler-rt: Rename last few cc files below test/ubsan to cpp 2019-08-05 13:23:38 +00:00
ubsan_minimal compiler-rt: Remove .cc from all lit config files 2019-08-05 19:25:35 +00:00
xray Add support for FreeBSD's LD_32_LIBRARY_PATH 2019-08-10 19:07:38 +00:00
.clang-format [compiler-rt] Use "ColumnLimit: 0" instead of "clang-format off" in tests 2018-12-01 01:24:29 +00:00
CMakeLists.txt Reland "[compiler-rt] Simple crtbegin.o and crtend.o implementation" 2019-04-30 18:13:22 +00:00
lit.common.cfg.py compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
lit.common.configured.in [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.* 2019-06-27 20:56:04 +00:00