llvm-project/compiler-rt/lib/tsan/rtl
Dmitry Vyukov b5ff187b7b tsan: mmap shadow stack
We used to mmap C++ shadow stack as part of the trace region
before ed7f3f5bc9 ("tsan: move shadow stack into ThreadState"),
which moved the shadow stack into TLS. This started causing
timeouts and OOMs on some of our internal tests that repeatedly
create and destroy thousands of threads.
Allocate C++ shadow stack with mmap and small pages again.
This prevents the observed timeouts and OOMs.
But we now need to be more careful with interceptors that
run after thread finalization because FuncEntry/Exit and
TraceAddEvent all need the shadow stack.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D113786
2021-11-13 09:12:55 +01:00
..
tsan.syms.extra [compiler-rt][tsan] Make fiber support in thread sanitizer dynamic linkable 2020-03-11 14:14:33 +01:00
tsan_clock.cpp [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
tsan_clock.h [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
tsan_debugging.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_defs.h Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_dense_alloc.h Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_dispatch_defs.h [TSan][libdispatch] Ensure TSan dylib works on old systems 2020-08-18 18:34:14 -07:00
tsan_external.cpp tsan: don't include tsan_interceptors.h for Go 2021-08-05 16:56:28 +02:00
tsan_fd.cpp tsan: new MemoryAccess interface 2021-08-03 11:03:23 +02:00
tsan_fd.h tsan: introduce Tid and StackID typedefs 2021-07-31 09:05:31 +02:00
tsan_flags.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_flags.h Improve error message when '=' is missing in {ASAN,...}_OPTIONS. 2019-06-15 01:37:14 +00:00
tsan_flags.inc Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_ignoreset.cpp tsan: minor IgnoreSet refactoring 2021-08-02 11:13:51 +02:00
tsan_ignoreset.h tsan: minor IgnoreSet refactoring 2021-08-02 11:13:51 +02:00
tsan_ilist.h tsan: add intrusive doubly-linked list 2021-07-29 17:07:27 +02:00
tsan_interceptors.h tsan: add debugging code for ptrace test failures 2021-10-29 17:37:02 +02:00
tsan_interceptors_libdispatch.cpp [TSan][libdispatch] Fix compilation error on Linux 2020-09-02 11:20:47 -07:00
tsan_interceptors_mac.cpp [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
tsan_interceptors_mach_vm.cpp [TSan][Darwin] Handle NULL argument in interceptor 2020-08-24 11:36:02 -07:00
tsan_interceptors_posix.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_interface.cpp tsan: make cur_thread_init return cur_thread 2021-10-05 15:24:52 +02:00
tsan_interface.h tsan: don't call dlsym during exit 2021-09-22 07:11:59 +02:00
tsan_interface.inc tsan: introduce kAccessExternalPC 2021-08-04 18:03:49 +02:00
tsan_interface_ann.cpp tsan: prevent insertion of memset into BenignRaceImpl 2021-07-31 09:17:14 +02:00
tsan_interface_ann.h
tsan_interface_atomic.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_interface_java.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_interface_java.h Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
tsan_malloc_mac.cpp compiler-rt: Rename .cc file in lib/tsan/rtl to .cpp 2019-08-01 14:22:42 +00:00
tsan_md5.cpp Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
tsan_mman.cpp tsan: mmap shadow stack 2021-11-13 09:12:55 +01:00
tsan_mman.h tsan: Support constructor arguments via New 2021-07-30 12:49:08 +02:00
tsan_mutexset.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_mutexset.h Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_new_delete.cpp Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
tsan_platform.h Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_platform_linux.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_platform_mac.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_platform_posix.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_platform_windows.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_ppc_regs.h
tsan_preinit.cpp compiler-rt: Rename .cc file in lib/tsan/rtl to .cpp 2019-08-01 14:22:42 +00:00
tsan_report.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_report.h Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_rtl.cpp tsan: mmap shadow stack 2021-11-13 09:12:55 +01:00
tsan_rtl.h tsan: mmap shadow stack 2021-11-13 09:12:55 +01:00
tsan_rtl_aarch64.S [TSan] Improve handling of stack pointer mangling in {set,long}jmp, pt.6 2019-07-16 20:41:04 +00:00
tsan_rtl_access.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_rtl_amd64.S tsan: fix XMM register corruption in hacky call 2021-11-12 12:53:47 +01:00
tsan_rtl_mips64.S
tsan_rtl_mutex.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_rtl_ppc64.S
tsan_rtl_proc.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_rtl_report.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_rtl_s390x.S [TSan] Add SystemZ longjmp support 2021-07-15 12:18:48 +02:00
tsan_rtl_thread.cpp tsan: mmap shadow stack 2021-11-13 09:12:55 +01:00
tsan_shadow.h Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_stack_trace.cpp tsan: introduce New/Alloc/Free helpers 2021-07-30 11:51:55 +02:00
tsan_stack_trace.h
tsan_suppressions.cpp Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
tsan_suppressions.h
tsan_symbolize.cpp tsan: introduce New/Alloc/Free helpers 2021-07-30 11:51:55 +02:00
tsan_symbolize.h
tsan_sync.cpp Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_sync.h Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_trace.h Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_update_shadow_word.inc Revert "tsan: new runtime (v3)" 2021-11-12 17:49:47 +01:00
tsan_vector_clock.cpp [tsan] Complete renaming kMaxSid to kThreadSlotCount 2021-08-02 16:52:29 +02:00
tsan_vector_clock.h tsan: add new vector clock 2021-08-02 13:45:31 +02:00