llvm-project/compiler-rt/test/asan/TestCases
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
..
Android [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.* 2019-06-27 20:56:04 +00:00
Darwin [sanitizer_common] Replace forkpty with posix_spawn on Darwin 2019-08-15 00:18:55 +00:00
Helpers compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
Linux compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
Posix [asan_symbolize] Fix bug where the frame counter was not incremented. 2019-08-12 18:51:25 +00:00
Windows compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_big_alignment.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_constant_size.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_detect_custom_size_.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_instruments_all_paddings.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_loop_unpoisoning.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_overflow_partial.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_overflow_right.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_safe_access.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_underflow_left.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
alloca_vla_interact.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
asan_and_llvm_coverage_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
asan_options-help.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
atexit_stats.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
atoi_strict.c
atol_strict.c
atoll_strict.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
blacklist.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
calloc-overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
contiguous_container.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
contiguous_container_crash.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
coverage-and-lsan.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
coverage-disabled.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
coverage-trace-pc.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
debug_double_free.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
debug_locate.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
debug_mapping.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
debug_ppc64_mapping.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
debug_report.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
debug_stacks.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
deep_stack_uaf.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
deep_tail_call.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
default_blacklist.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
default_options.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
describe_address.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
double-free.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
error_report_callback.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
exitcode.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
force_inline_opt0.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
frexp_interceptor.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
global-address.cpp [asan] Fix tests broken by r312858 2017-09-09 20:07:45 +00:00
global-demangle.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
global-location.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
global-overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
global-underflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
halt_on_error-1.c
handle_noreturn_bug.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
heap-overflow-large.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
heap-overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
heavy_uar_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
huge_negative_hea_oob.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
ill.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
init-order-atexit.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
initialization-blacklist.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
initialization-bug.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
initialization-constexpr.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
initialization-nobug.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
inline.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
intercept-rethrow-exception.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
interception_failure_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
interface_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
intra-object-overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-free.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-pointer-pairs-compare-errors.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-pointer-pairs-compare-null.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-pointer-pairs-compare-success.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-pointer-pairs-subtract-errors.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-pointer-pairs-subtract-success.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-pointer-pairs.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
large_func_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
log-path_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
longjmp.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
lsan_annotations.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
malloc-no-intercept.c [Sanitizers, test] Fix sanitizer tests on Solaris (PR 33274) 2018-01-17 12:26:04 +00:00
malloc-size-too-big.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
malloc_context_size.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
malloc_fill.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
max_redzone.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
memcmp_strict_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
memcmp_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
memset_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
non-executable-pc.cpp Limit ASan non-executable-pc test case to x86 bots 2018-07-10 19:34:46 +00:00
null_deref.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
on_error_callback.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
partial_right.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
pass-object-byval.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
pass-struct-byval-uar.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
pass-struct-byval.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
poison_partial.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
pr33372.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
print_summary.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
printf-1.c
printf-2.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
printf-3.c [asan] Disable test incompatible with new Android 2018-12-20 00:24:09 +00:00
printf-4.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
printf-5.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
printf-m.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
realloc.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
sanity_check_pure_c.c test: filter out -fPIE/-pie on Windows 2016-12-27 03:16:20 +00:00
scariness_score_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
set_shadow_test.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
sleep_after_init.c Add new ASAN_OPTION: sleep_after_init. 2017-08-02 18:48:45 +00:00
sleep_before_dying.c
small_memcpy_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
speculative_load.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
speculative_load2.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
stack-buffer-overflow-with-position.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
stack-buffer-overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
stack-frame-demangle.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
stack-oob-frames.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strcasestr-1.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
strcasestr-2.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
strcasestr_strict.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
strcat-overlap.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strcat_strict.c
strchr_strict.c
strcmp_strict.c
strcpy-overlap.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strcspn-1.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strcspn-2.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strcspn_strict.c
strdup_oob_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strip_path_prefix.c
strncasecmp_strict.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
strncat-overlap.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strncat_strict.c
strncmp_strict.c Split strncmp and strncasecmp test and XFAIL one for Windows 2016-11-14 17:51:11 +00:00
strncpy-overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strncpy-overlap.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strpbrk-1.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strpbrk-2.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strpbrk_strict.c
strspn-1.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strspn-2.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strspn_strict.c
strstr-1.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strstr-2.c [asan] Support line numbers in StackVarDescr 2017-03-30 00:41:09 +00:00
strstr_strict.c [asan] relax strstr tests. 2016-10-24 19:07:27 +00:00
strtok.c Fix the typo in strtok.c testcase: There was a missing space in %run expansion. 2017-04-26 20:02:14 +00:00
strtol_strict.c [asan] Properly mark or disable tests that only work with shadow scale of 3 2017-11-16 23:29:19 +00:00
strtoll_strict.c [CMake] Use normalized Windows target triples 2018-08-09 02:16:18 +00:00
suppressions-exec-relative-location.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
suppressions-function.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
suppressions-interceptor.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
suppressions-library.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
throw_call_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
throw_catch.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
throw_invoke_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
time_interceptor.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
uar_and_exceptions.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
unaligned_loads_and_stores.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-delete.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-free-right.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-free.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-poison.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-capture.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-conversion.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-dtor-order.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-goto.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-if.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-inlined.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-loop-bug.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-loop-removed.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-loop.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-nobug.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-temp.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-temp2.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope-types.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
use-after-scope.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
verbose-log-path_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
vla_chrome_testcase.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
vla_condition_overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
vla_loop_overfow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
zero_page_pc.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00