llvm-project/compiler-rt/lib/sanitizer_common
Blue Gaston fc4c872d8f [Darwin][ASan] Fix "interceptor working?" check for DriverKit platform
The previous check for interceptors used `pthread_create()` which is not
available on DriverKit.  We need an intercepted symbol that satisfies
the following constraints:

- Symbol is available in DriverKit
- Symbol is provided by simulator runtime dylibs (`dlsym()` fails to
  look up host-provided symbols)

`puts()` satisfies all of the above constraints.

rdar://87895539

Reviewed By: yln

Differential Revision: https://reviews.llvm.org/D123245
2022-04-06 15:49:22 -07:00
..
scripts [sanitizer] Remove cpplint 2021-07-30 15:21:04 -07:00
symbolizer [Support/BLAKE3] Re-enable building with the simd-optimized implementations, v2 2022-03-31 01:00:03 -07:00
tests sanitizer_common: add Mutex::TryLock 2022-04-01 17:56:19 +02:00
.clang-format Revert "sanitizers: increase .clang-format columns to 100" 2021-07-28 09:40:21 +02:00
CMakeLists.txt [gn build] slighly reformat files to make sync script work 2022-01-27 20:09:04 -05:00
sancov_flags.cpp
sancov_flags.h
sancov_flags.inc [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
sanitizer_addrhashmap.h sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
sanitizer_allocator.cpp sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
sanitizer_allocator.h [NFC][sanitizer] Remove SetSoftRssLimitExceededCallback 2021-12-02 14:37:02 -08:00
sanitizer_allocator_checks.cpp
sanitizer_allocator_checks.h [compiler-rt] Replace INLINE with inline 2020-09-17 16:24:20 +02:00
sanitizer_allocator_combined.h sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
sanitizer_allocator_dlsym.h [sanitizer] Switch dlsym hack to internal_allocator 2021-11-12 16:11:10 -08:00
sanitizer_allocator_interface.h
sanitizer_allocator_internal.h tsan: lock internal allocator around fork 2021-11-24 17:01:28 +01:00
sanitizer_allocator_local_cache.h sanitizer_common: optimize memory drain 2021-07-13 16:28:48 -07:00
sanitizer_allocator_primary32.h sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
sanitizer_allocator_primary64.h sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
sanitizer_allocator_report.cpp [MemProf] Memory profiling runtime support 2020-10-16 09:47:02 -07:00
sanitizer_allocator_report.h [MemProf] Memory profiling runtime support 2020-10-16 09:47:02 -07:00
sanitizer_allocator_secondary.h sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
sanitizer_allocator_size_class_map.h [sanitizer] Fix format string 2021-08-14 16:53:46 -07:00
sanitizer_allocator_stats.h
sanitizer_asm.h [sanitizer] Use one #if instead of 3 nested #if after D111185 2021-10-08 10:31:57 -07:00
sanitizer_atomic.h [compiler-rt] Replace INLINE with inline 2020-09-17 16:24:20 +02:00
sanitizer_atomic_clang.h [sanitizer][mips] Fix the condition to include sanitizer_atomic_clang_mips.h 2022-03-09 10:20:05 -08:00
sanitizer_atomic_clang_mips.h [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
sanitizer_atomic_clang_other.h [sanitizer] Use __atomic_load/store() built-ins for generic 32-bit targets 2020-10-30 09:17:46 +01:00
sanitizer_atomic_clang_x86.h [compiler-rt] Replace INLINE with inline 2020-09-17 16:24:20 +02:00
sanitizer_atomic_msvc.h [compiler-rt] Replace INLINE with inline 2020-09-17 16:24:20 +02:00
sanitizer_bitvector.h
sanitizer_bvgraph.h
sanitizer_chained_origin_depot.cpp [NFC][sanitizer] Rename persistent_allocator to stack_store 2021-11-18 18:36:58 -08:00
sanitizer_chained_origin_depot.h [NFC][sanitizer] Remove includes from header 2021-10-08 14:27:05 -07:00
sanitizer_common.cpp sanitizer_common: expose max_address from LoadedModule 2022-04-01 17:56:03 +02:00
sanitizer_common.h sanitizer_common: expose max_address from LoadedModule 2022-04-01 17:56:03 +02:00
sanitizer_common_interceptors.inc [msan] Add interceptors for Linux 64-bit stat variants 2022-03-15 20:22:28 -07:00
sanitizer_common_interceptors_format.inc sanitizer_common: fix format strings 2021-08-13 13:44:41 +02:00
sanitizer_common_interceptors_ioctl.inc [MSAN] extend ioctl interceptor to support BLKSSZGET 2022-03-04 15:39:30 -08:00
sanitizer_common_interceptors_netbsd_compat.inc [compiler-rt] change internal internal libc invariants 2021-08-24 16:41:15 +00:00
sanitizer_common_interceptors_vfork_aarch64.inc.S [AArch64][compiler-rt] Fix PAC instructions for older compilers 2021-03-11 09:21:05 +00:00
sanitizer_common_interceptors_vfork_arm.inc.S
sanitizer_common_interceptors_vfork_i386.inc.S Reland [sanitizer] Support Intel CET 2021-10-08 10:22:39 -07:00
sanitizer_common_interceptors_vfork_riscv64.inc.S [RISCV][ASAN] implementation for vfork interceptor for riscv64 2020-09-22 22:23:29 -07:00
sanitizer_common_interceptors_vfork_x86_64.inc.S Reland [sanitizer] Support Intel CET 2021-10-08 10:22:39 -07:00
sanitizer_common_interface.inc [sanitizer_common] Add facility to get the full report path 2020-11-19 09:19:12 -08:00
sanitizer_common_interface_posix.inc [sanitizer] Add common "demangle" flag 2021-12-23 14:36:39 -08:00
sanitizer_common_libcdep.cpp sanitizer_common: make internal/external headers compatible 2022-02-11 19:39:44 +01:00
sanitizer_common_nolibc.cpp [Sanitizer] Allow setting the report path to create directory 2021-09-21 16:42:42 -07:00
sanitizer_common_syscalls.inc [sanitizer] Add callbacks for epoll_pwait2 2021-08-02 14:14:19 -07:00
sanitizer_coverage_fuchsia.cpp [sanitizers] Add missing header to fix Fuchsia builds 2022-02-11 21:58:02 +00:00
sanitizer_coverage_interface.inc [SanitizerCoverage] Add `__sanitizer_cov_bool_flag_init` as the weak interface functions. 2020-04-24 19:54:54 -07:00
sanitizer_coverage_libcdep_new.cpp [sancov][sanitizer-common] Correct sanitizer coverage point 2022-02-24 17:16:45 +08:00
sanitizer_coverage_win_dll_thunk.cpp
sanitizer_coverage_win_dynamic_runtime_thunk.cpp
sanitizer_coverage_win_sections.cpp
sanitizer_coverage_win_weak_interception.cpp
sanitizer_dbghelp.h
sanitizer_deadlock_detector.h [compiler-rt] Fix typo in DeadlockDetector (chanding->changing) 2021-11-10 21:51:47 +01:00
sanitizer_deadlock_detector1.cpp sanitizer_common: use 0 for empty stack id 2021-07-12 12:24:27 +02:00
sanitizer_deadlock_detector2.cpp sanitizer_common: rename Mutex to MutexState 2021-07-12 11:23:46 +02:00
sanitizer_deadlock_detector_interface.h [NFC] Fix cpplint warnings 2020-11-04 22:56:08 -08:00
sanitizer_dense_map.h [NFC][sanitizer] Reuse forEach for operator== 2021-11-23 15:23:25 -08:00
sanitizer_dense_map_info.h [NFC][sanitizer] constexpr in sanitizer_dense_map_info 2021-12-01 13:45:42 -08:00
sanitizer_errno.cpp
sanitizer_errno.h [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
sanitizer_errno_codes.h [msan] Skip memcpy interceptor called by gethostname 2020-09-25 15:26:34 -07:00
sanitizer_file.cpp [sanitizer] Check if directory exists before trying to create 2022-02-13 06:59:32 -08:00
sanitizer_file.h [sanitizer] Check if directory exists before trying to create 2022-02-13 06:59:32 -08:00
sanitizer_flag_parser.cpp
sanitizer_flag_parser.h sanitizer_common: fix format strings 2021-08-13 13:44:41 +02:00
sanitizer_flags.cpp [asan] Add %d variable to external_symbolizer_path option, so that user can specify paths relative to the location of the binary. 2021-02-04 15:43:02 -08:00
sanitizer_flags.h [NFC] Extract InitializePlatformCommonFlags 2020-11-04 19:23:28 -08:00
sanitizer_flags.inc [sanitizer] Add common "demangle" flag 2021-12-23 14:36:39 -08:00
sanitizer_flat_map.h [NFC][sanitizer] Atomix relaxed in TwoLevelMap 2021-10-31 12:18:03 -07:00
sanitizer_freebsd.h
sanitizer_fuchsia.cpp sanitizer_common: Remove Fuchsia support for reading flags from files 2022-03-28 10:54:04 -07:00
sanitizer_fuchsia.h [NFC][compiler-rt][fuchsia] Add InitShadowBounds declaration to header 2021-07-08 13:19:17 -07:00
sanitizer_getauxval.h Disable getauxval for Go 2020-07-31 10:13:03 -07:00
sanitizer_glibc_version.h
sanitizer_hash.h [NFC][sanitizer] Add MurMur2Hash64Builder 2021-10-05 20:54:06 -07:00
sanitizer_interceptors_ioctl_netbsd.inc [sanitizer] Remove cpplint annotations 2021-07-30 18:20:40 -07:00
sanitizer_interface_internal.h [NFC] clang-format sanitizer_interface_internal.h 2022-03-29 13:29:07 -07:00
sanitizer_internal_defs.h [CompilerRT] Fix build of compiler-rt with musl 2022-03-09 13:41:30 -08:00
sanitizer_leb128.h [sanitizer] Add Leb128 encoding/decoding 2021-11-29 17:12:34 -08:00
sanitizer_lfstack.h
sanitizer_libc.cpp Revert "SIGSEGV in Sanitizer INTERCEPTOR of strstr function." 2022-01-05 21:28:01 -08:00
sanitizer_libc.h [compiler-rt] change internal internal libc invariants 2021-08-24 16:41:15 +00:00
sanitizer_libignore.cpp sanitizer_common: fix format string in LibIgnore 2021-08-16 09:45:42 +02:00
sanitizer_libignore.h sanitizer_common: remove BlockingMutex and RWMutex 2021-07-29 12:38:53 +02:00
sanitizer_linux.cpp [sanitizer] Check if directory exists before trying to create 2022-02-13 06:59:32 -08:00
sanitizer_linux.h [NFC][sanitizer] Non-copyable ScopedBlockSignals 2021-12-06 22:37:28 -08:00
sanitizer_linux_libcdep.cpp [sanitizer_common] Use GetStaticTlsBoundary on Solaris 11.4 2022-02-22 20:18:22 +01:00
sanitizer_linux_s390.cpp [SystemZ] [Sanitizer] Bugfixes in internal_clone(). 2021-11-17 14:42:08 -05:00
sanitizer_list.h
sanitizer_local_address_space_view.h [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
sanitizer_lzw.h [sanitizer] Add Lempel–Ziv–Welch encoder/decoder 2021-12-03 13:11:40 -08:00
sanitizer_mac.cpp [Darwin][ASan] Fix "interceptor working?" check for DriverKit platform 2022-04-06 15:49:22 -07:00
sanitizer_mac.h [darwin] use new crash reporter api 2021-02-23 09:23:23 -08:00
sanitizer_mac_libcdep.cpp
sanitizer_malloc_mac.inc [sanitizer] Switch dlsym hack to internal_allocator 2021-11-12 16:11:10 -08:00
sanitizer_mutex.cpp sanitizer_common: fix deadlock detector output 2021-10-26 16:11:52 +02:00
sanitizer_mutex.h sanitizer_common: add Mutex::TryLock 2022-04-01 17:56:19 +02:00
sanitizer_netbsd.cpp sanitizer_common: sanitize time functions 2021-07-11 12:09:47 +02:00
sanitizer_openbsd.cpp [Sanitizers] Remove OpenBSD support (new attempt) 2020-10-20 11:16:09 +01:00
sanitizer_placement_new.h
sanitizer_platform.h [CompilerRT] Fix build of compiler-rt with musl 2022-03-09 13:41:30 -08:00
sanitizer_platform_interceptors.h [msan] Add interceptors for Linux 64-bit stat variants 2022-03-15 20:22:28 -07:00
sanitizer_platform_limits_freebsd.cpp msan: account for AVX state when unpoison ucontext_t 2022-01-05 13:20:40 +01:00
sanitizer_platform_limits_freebsd.h Revert "[MSAN] add interceptor for timer_create, timer_settime, timer_gettime" 2022-03-09 14:57:05 -08:00
sanitizer_platform_limits_linux.cpp [sanitizer] Add hexagon support to sanitizer-common 2021-08-17 19:59:24 -07:00
sanitizer_platform_limits_netbsd.cpp msan: account for AVX state when unpoison ucontext_t 2022-01-05 13:20:40 +01:00
sanitizer_platform_limits_netbsd.h Revert "[MSAN] add interceptor for timer_create, timer_settime, timer_gettime" 2022-03-09 14:57:05 -08:00
sanitizer_platform_limits_openbsd.cpp [Sanitizers] Remove OpenBSD support (new attempt) 2020-10-20 11:16:09 +01:00
sanitizer_platform_limits_openbsd.h [Sanitizers] Remove OpenBSD support (new attempt) 2020-10-20 11:16:09 +01:00
sanitizer_platform_limits_posix.cpp [MSAN] extend ioctl interceptor to support BLKSSZGET 2022-03-04 15:39:30 -08:00
sanitizer_platform_limits_posix.h Revert "[MSAN] add interceptor for timer_create, timer_settime, timer_gettime" 2022-03-09 14:57:05 -08:00
sanitizer_platform_limits_solaris.cpp msan: account for AVX state when unpoison ucontext_t 2022-01-05 13:20:40 +01:00
sanitizer_platform_limits_solaris.h Revert "[MSAN] add interceptor for timer_create, timer_settime, timer_gettime" 2022-03-09 14:57:05 -08:00
sanitizer_posix.cpp [sanitizer_common] Don't try to unmap unaligned memory 2022-02-09 09:15:41 +01:00
sanitizer_posix.h [compiler-rt][hwasan] Check for SANITIZER_POSIX before including sanitizer_posix.h 2021-07-29 14:21:30 -07:00
sanitizer_posix_libcdep.cpp sanitizer_common: make internal/external headers compatible 2022-02-11 19:39:44 +01:00
sanitizer_printf.cpp [NFC][sanitizer] Fix veradic-macro warning in RAW_CHECK 2021-11-17 18:10:54 -08:00
sanitizer_procmaps.h [memprof] Add a raw binary format to serialize memprof profiles. 2021-11-11 11:29:36 -08:00
sanitizer_procmaps_bsd.cpp [Sanitizers] Remove OpenBSD support (new attempt) 2020-10-20 11:16:09 +01:00
sanitizer_procmaps_common.cpp sanitizer_common: fix crashes in parsing of memory profiles 2021-10-29 14:03:12 +02:00
sanitizer_procmaps_fuchsia.cpp
sanitizer_procmaps_linux.cpp
sanitizer_procmaps_mac.cpp [ASan][Darwin] Avoid crash during ASan initialization 2022-01-07 12:28:38 -08:00
sanitizer_procmaps_solaris.cpp [sanitizer_common] Fix readlink error handling in sanitizer_procmaps_solaris.cpp 2021-11-02 22:06:17 +01:00
sanitizer_ptrauth.h [AArch64][compiler-rt] Strip PAC from the link register. 2021-03-18 22:01:50 +01:00
sanitizer_quarantine.h sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
sanitizer_report_decorator.h
sanitizer_ring_buffer.h Sign-extend addresses in CompactRingBuffer. 2022-02-10 11:59:15 -08:00
sanitizer_signal_interceptors.inc [ubsan] warn inside the sigaction interceptor if static linking is suspected, and continue instead of crashing on null deref 2021-09-01 12:36:48 -07:00
sanitizer_solaris.cpp sanitizer_common: replace RWMutex/BlockingMutex with Mutex 2021-07-28 15:10:24 +02:00
sanitizer_stack_store.cpp [compiler-rt] Silence warnings when building with MSVC 2022-01-11 10:36:57 -05:00
sanitizer_stack_store.h sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
sanitizer_stackdepot.cpp [sanitizer] Don't collect unused info 2022-02-24 20:20:34 -08:00
sanitizer_stackdepot.h [sanitizer] Run Stack compression in background thread 2021-12-09 10:29:50 -08:00
sanitizer_stackdepotbase.h [NFC][sanitizer] Add StackDepotTestOnlyUnmap 2021-10-16 13:47:57 -07:00
sanitizer_stacktrace.cpp [sanitizer][sancov] Use pc-1 for s390x 2022-02-23 13:35:22 -08:00
sanitizer_stacktrace.h [sanitizer][sancov] Use pc-1 for s390x 2022-02-23 13:35:22 -08:00
sanitizer_stacktrace_libcdep.cpp sanitizer_common: fix __sanitizer_get_module_and_offset_for_pc signature mismatch 2022-02-03 19:41:19 +01:00
sanitizer_stacktrace_printer.cpp [sanitizers] include build ids in stacks on linux. 2021-12-10 14:24:03 -08:00
sanitizer_stacktrace_printer.h [sanitizer] Skip stack symbolization when not required for print format 2020-10-07 15:38:52 -07:00
sanitizer_stacktrace_sparc.cpp [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
sanitizer_stoptheworld.h [sanitizer] Cleanup -Wnon-virtual-dtor warnings 2020-11-02 20:30:50 -08:00
sanitizer_stoptheworld_fuchsia.cpp [compiler-rt] Use empty SuspendedThreadsList for Fuchsia 2020-11-03 11:34:13 -08:00
sanitizer_stoptheworld_fuchsia.h [compiler-rt] Use empty SuspendedThreadsList for Fuchsia 2020-11-03 11:34:13 -08:00
sanitizer_stoptheworld_linux_libcdep.cpp sanitizer_common: remove BlockingMutex and RWMutex 2021-07-29 12:38:53 +02:00
sanitizer_stoptheworld_mac.cpp [sanitizer] Cleanup -Wnon-virtual-dtor warnings 2020-11-02 20:30:50 -08:00
sanitizer_stoptheworld_netbsd_libcdep.cpp sanitizer_common: remove BlockingMutex and RWMutex 2021-07-29 12:38:53 +02:00
sanitizer_stoptheworld_win.cpp Silence warning with MSVC. 2022-01-15 12:06:38 -05:00
sanitizer_suppressions.cpp [sanitizer][NFC] Remove InternalScopedString::size() 2021-03-16 14:11:59 -07:00
sanitizer_suppressions.h
sanitizer_symbolizer.cpp [Darwin] Remove workaround for symbolication in iOS simulator runtimes 2021-12-15 17:22:13 -08:00
sanitizer_symbolizer.h [Darwin] Remove workaround for symbolication in iOS simulator runtimes 2021-12-15 17:22:13 -08:00
sanitizer_symbolizer_fuchsia.h
sanitizer_symbolizer_internal.h [NFC][sanitizer] Increase kArgVMax to 16 2021-12-23 11:11:47 -08:00
sanitizer_symbolizer_libbacktrace.cpp
sanitizer_symbolizer_libbacktrace.h [sanitizer] Cleanup -Wnon-virtual-dtor warnings 2020-11-02 20:30:50 -08:00
sanitizer_symbolizer_libcdep.cpp [sanitizer] Add common "demangle" flag 2021-12-23 14:36:39 -08:00
sanitizer_symbolizer_mac.cpp [sanitizer] Check kArgVMax in SymbolizerProcess::GetArgV 2021-12-23 11:05:37 -08:00
sanitizer_symbolizer_mac.h [Darwin] Remove workaround for symbolication in iOS simulator runtimes 2021-12-15 17:22:13 -08:00
sanitizer_symbolizer_markup.cpp [Darwin] Remove workaround for symbolication in iOS simulator runtimes 2021-12-15 17:22:13 -08:00
sanitizer_symbolizer_posix_libcdep.cpp [sanitizer] Add common "demangle" flag 2021-12-23 14:36:39 -08:00
sanitizer_symbolizer_report.cpp Reapply [sanitizers] Avoid macro clash in SignalContext::WriteFlag (NFC) 2022-02-09 10:22:05 +01:00
sanitizer_symbolizer_win.cpp [Darwin] Remove workaround for symbolication in iOS simulator runtimes 2021-12-15 17:22:13 -08:00
sanitizer_syscall_generic.inc [Sanitizers] Remove OpenBSD support (new attempt) 2020-10-20 11:16:09 +01:00
sanitizer_syscall_linux_aarch64.inc
sanitizer_syscall_linux_arm.inc
sanitizer_syscall_linux_hexagon.inc [sanitizer] Add hexagon support to sanitizer-common 2021-08-17 19:59:24 -07:00
sanitizer_syscall_linux_riscv64.inc [NFC] Fix banner 2020-10-09 10:00:11 +01:00
sanitizer_syscall_linux_x86_64.inc
sanitizer_syscalls_netbsd.inc msan: account for AVX state when unpoison ucontext_t 2022-01-05 13:20:40 +01:00
sanitizer_termination.cpp msan: disble CHECK test on powerpc64 2021-10-25 19:38:27 +02:00
sanitizer_thread_registry.cpp tsan: fix failures after multi-threaded fork 2021-12-21 16:54:00 +01:00
sanitizer_thread_registry.h sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
sanitizer_thread_safety.h sanitizer_common: prefix thread-safety macros with SANITIZER_ 2022-01-07 15:11:00 +01:00
sanitizer_tls_get_addr.cpp Fix -Wformat warnings reported by GCC. 2021-11-04 08:51:43 +01:00
sanitizer_tls_get_addr.h [sanitizer] Make DTLS_on_tls_get_addr signal safer 2020-12-01 16:16:04 -08:00
sanitizer_type_traits.cpp
sanitizer_type_traits.h [sanitizer] Add a few of type_traits tools 2021-11-17 17:52:40 -08:00
sanitizer_unwind_linux_libcdep.cpp
sanitizer_unwind_win.cpp Fix registers for Windows on ARM64 2022-01-13 21:39:01 -08:00
sanitizer_vector.h
sanitizer_win.cpp [sanitizer] Check if directory exists before trying to create 2022-02-13 06:59:32 -08:00
sanitizer_win.h
sanitizer_win_defs.h
sanitizer_win_dll_thunk.cpp
sanitizer_win_dll_thunk.h
sanitizer_win_dynamic_runtime_thunk.cpp
sanitizer_win_weak_interception.cpp
sanitizer_win_weak_interception.h
weak_symbols.txt [sanitizer] Add common "demangle" flag 2021-12-23 14:36:39 -08:00