llvm-project/compiler-rt/lib/sanitizer_common
Kamil Rytarowski c815ed5792 Add new interceptors for pwcache(3)-style functions
Summary:
From <pwd.h>: user_from_uid, uid_from_user

From <grp.h>: group_from_gid, gid_from_group

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, vitalybuka

Reviewed By: vitalybuka

Subscribers: kubamracek, llvm-commits, #sanitizers

Tags: #sanitizers

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

llvm-svn: 322829
2018-01-18 10:53:27 +00:00
..
scripts [Sanitizers] Export aligned new/delete from runtimes. 2017-12-23 00:30:51 +00:00
symbolizer [sanitizer] Fix internal symbolized build on Debian 9 2017-10-26 06:08:01 +00:00
tests [Sanitizers] Make common allocator agnostic to failure handling modes. 2018-01-17 23:20:36 +00:00
.clang-format Tell clang-format that (most) sanitizers are written using Google style guide. 2015-11-19 22:11:10 +00:00
.clang-tidy [sanitizers] specifying style for global constant 2016-11-17 21:57:43 +00:00
CMakeLists.txt [Sanitizers, CMake] Basic sanitizer Solaris support (PR 33274) 2017-12-22 18:04:20 +00:00
sancov_begin.S [Sanitizers, CMake] Basic sanitizer Solaris support (PR 33274) 2017-12-22 18:04:20 +00:00
sancov_end.S [Sanitizers, CMake] Basic sanitizer Solaris support (PR 33274) 2017-12-22 18:04:20 +00:00
sancov_flags.cc General definition for weak functions 2017-01-29 05:44:59 +00:00
sancov_flags.h [sancov] Move __sancov_default_options declaration outside the namespace __sancov 2017-02-01 01:36:19 +00:00
sancov_flags.inc Revert "[sancov] moving sancov rt to sancov/ directory" 2017-01-12 01:37:35 +00:00
sanitizer_addrhashmap.h adding operator* to help working with primitive values 2016-11-16 19:35:37 +00:00
sanitizer_allocator.cc [Sanitizers] Make common allocator agnostic to failure handling modes. 2018-01-17 23:20:36 +00:00
sanitizer_allocator.h [sanitizer] Random shuffling of chunks for the 32-bit Primary Allocator 2017-10-25 17:24:56 +00:00
sanitizer_allocator_bytemap.h [sanitizers] split sanitizer_allocator.h into a number of smaller .h files; NFC 2016-07-20 22:06:41 +00:00
sanitizer_allocator_checks.cc [sanitizer] Move the errno/ENOMEM allocator checks logic to separate .cc 2017-10-11 21:20:04 +00:00
sanitizer_allocator_checks.h [sanitizer] Move the errno/ENOMEM allocator checks logic to separate .cc 2017-10-11 21:20:04 +00:00
sanitizer_allocator_combined.h [Sanitizers] Make common allocator agnostic to failure handling modes. 2018-01-17 23:20:36 +00:00
sanitizer_allocator_interface.h [Sanitizers] New sanitizer API to purge allocator quarantine. 2017-10-23 17:12:07 +00:00
sanitizer_allocator_internal.h [Sanitizers] Make common allocator agnostic to failure handling modes. 2018-01-17 23:20:36 +00:00
sanitizer_allocator_local_cache.h [sanitizer] Re-introduce kUseSeparateSizeClassForBatch for the 32-bit Primary 2017-08-28 15:20:02 +00:00
sanitizer_allocator_primary32.h [sanitizer] Random shuffling of chunks for the 32-bit Primary Allocator 2017-10-25 17:24:56 +00:00
sanitizer_allocator_primary64.h [sanitizer] Introduce a vDSO aware timing function 2017-12-13 16:23:54 +00:00
sanitizer_allocator_secondary.h [Sanitizers] Make common allocator agnostic to failure handling modes. 2018-01-17 23:20:36 +00:00
sanitizer_allocator_size_class_map.h [sanitizer] Re-introduce kUseSeparateSizeClassForBatch for the 32-bit Primary 2017-08-28 15:20:02 +00:00
sanitizer_allocator_stats.h [sanitizers] split sanitizer_allocator.h into a number of smaller .h files; NFC 2016-07-20 22:06:41 +00:00
sanitizer_asm.h [sanitizer] Refactor how assembly files are handled 2017-11-29 19:27:25 +00:00
sanitizer_atomic.h Return memory to OS right after free (not in the async thread). 2016-11-29 00:22:50 +00:00
sanitizer_atomic_clang.h Reland "[mips][compiler-rt] Provide 64bit atomic add and sub" 2017-12-22 20:31:07 +00:00
sanitizer_atomic_clang_mips.h Reland "[mips][compiler-rt] Provide 64bit atomic add and sub" 2017-12-22 20:31:07 +00:00
sanitizer_atomic_clang_other.h Reland "[mips][compiler-rt] Provide 64bit atomic add and sub" 2017-12-22 20:31:07 +00:00
sanitizer_atomic_clang_x86.h
sanitizer_atomic_msvc.h [asan Win64] Implement atomic_compare_exchange_strong for 8 bit 2016-07-06 16:33:57 +00:00
sanitizer_bitvector.h Update other SizeEnums to be of type uptr as well 2017-12-06 23:02:02 +00:00
sanitizer_bvgraph.h Update other SizeEnums to be of type uptr as well 2017-12-06 23:02:02 +00:00
sanitizer_common.cc [scudo] Make getNumberOfCPUs Fuchsia compliant v2 2017-11-21 21:14:00 +00:00
sanitizer_common.h [sanitizer] Introduce a vDSO aware timing function 2017-12-13 16:23:54 +00:00
sanitizer_common_interceptors.inc Add new interceptors for pwcache(3)-style functions 2018-01-18 10:53:27 +00:00
sanitizer_common_interceptors_format.inc [asan] print the 'unexpected format specifier in printf interceptor' warning just once (came up in https://github.com/google/oss-fuzz/pull/562). Not touching a similar scanf warning -- for some reason it does not fire for me. 2017-05-03 18:38:34 +00:00
sanitizer_common_interceptors_ioctl.inc [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_common_interface.inc [Sanitizers] New sanitizer API to purge allocator quarantine. 2017-10-23 17:12:07 +00:00
sanitizer_common_interface_posix.inc [sanitizer] Add list of symbols exported in sanitizers' interface. 2017-01-31 20:23:21 +00:00
sanitizer_common_libcdep.cc [sanitizer] Remove references and hide CommonSanitizerReportMutex 2017-11-10 02:07:11 +00:00
sanitizer_common_nolibc.cc tsan: fix build after 287632 2016-11-22 11:09:35 +00:00
sanitizer_common_syscalls.inc [sanitizer] Add syscall handlers for sigaction and rt_sigaction. 2016-06-24 23:09:44 +00:00
sanitizer_coverage_fuchsia.cc Revert "[SanitizerCoverage][Fuchsia] Make TracePcGuardController linker-initialized" 2018-01-13 00:56:28 +00:00
sanitizer_coverage_interface.inc [sanitizer_common] Update sanitizers w.r.t. the new comparisons instrumentation API 2017-08-10 14:22:57 +00:00
sanitizer_coverage_libcdep_new.cc [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer 2017-08-30 22:49:31 +00:00
sanitizer_coverage_win_dll_thunk.cc [sanitizer] Intercept weak functions in dll_thunks. 2017-02-02 23:01:34 +00:00
sanitizer_coverage_win_dynamic_runtime_thunk.cc [sanitizer] Add dynamic_runtime_thunk for different sanitizers. 2017-02-02 23:01:41 +00:00
sanitizer_coverage_win_sections.cc [sancov] Define delimiters for sanitizer coverage's binary section on Windows. 2017-02-02 23:02:15 +00:00
sanitizer_coverage_win_weak_interception.cc [sanitizer] Use interception to access to strong definitions in the executable. 2017-02-02 23:02:11 +00:00
sanitizer_dbghelp.h [asan/win] Delay load dbghelp.dll to delay ucrtbase.dll initialization 2016-11-14 17:37:50 +00:00
sanitizer_deadlock_detector.h
sanitizer_deadlock_detector1.cc [tsan] Don't abort when a deadlock detector finds a mutex cycle longer than 10 2016-05-21 08:31:13 +00:00
sanitizer_deadlock_detector2.cc
sanitizer_deadlock_detector_interface.h [tsan] Don't abort when a deadlock detector finds a mutex cycle longer than 10 2016-05-21 08:31:13 +00:00
sanitizer_errno.cc [Sanitizers] Consolidate internal errno definitions. 2017-07-06 00:50:57 +00:00
sanitizer_errno.h [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_errno_codes.h [Sanitizers] Consolidate internal errno definitions. 2017-07-06 00:50:57 +00:00
sanitizer_file.cc [sanitizer_common] Disable filesystem-related code for Fuchsia 2017-08-01 21:28:39 +00:00
sanitizer_file.h [sanitizer_common] Move filesystem-related code out of sanitizer_common.cc 2017-07-22 01:46:40 +00:00
sanitizer_flag_parser.cc [sanitizer] Implement include_if_exists with process name substitution. 2015-07-21 23:03:13 +00:00
sanitizer_flag_parser.h [sanitizer] Do not over-dup string flags 2017-08-21 21:25:38 +00:00
sanitizer_flags.cc [ASan] Report illegal instruction exceptions in ASan 2016-08-03 18:13:14 +00:00
sanitizer_flags.h [sanitizer] Remove unnecessary attribute hidden. 2017-11-10 22:52:44 +00:00
sanitizer_flags.inc [sanitizer] Add 'strip_env' flag to enable/disable removing sanitizer dylib from DYLD_INSERT_LIBRARIES 2017-11-29 21:42:48 +00:00
sanitizer_freebsd.h
sanitizer_fuchsia.cc [sanitizer] Introduce a vDSO aware timing function 2017-12-13 16:23:54 +00:00
sanitizer_fuchsia.h [sanitizer_common] Don't provide sanitizer_procmaps API functions where not defined 2017-09-25 20:48:51 +00:00
sanitizer_getauxval.h [scudo] Overhaul hardware CRC32 feature detection 2017-11-22 18:30:44 +00:00
sanitizer_interface_internal.h [sanitizer_common] Update sanitizers w.r.t. the new comparisons instrumentation API 2017-08-10 14:22:57 +00:00
sanitizer_internal_defs.h lib Fuzzer FreeBSD support 2018-01-12 17:15:05 +00:00
sanitizer_lfstack.h [sanitizer] Fix Clang-tidy modernize-use-nullptr warnings in lib/sanitizer_common headers, unify closing inclusion guards. Patch by Eugene Zelenko 2015-09-29 18:23:36 +00:00
sanitizer_libc.cc [compiler-rt] Add internal wcslen to avoid crashing on windows 64-bits 2016-07-14 22:13:41 +00:00
sanitizer_libc.h Fix clang-cl warning and crash in sanitizers 2016-07-21 18:31:01 +00:00
sanitizer_libignore.cc [tsan] Separate the constants in libignore and bump the maximum for instrumented libraries 2018-01-04 02:28:51 +00:00
sanitizer_libignore.h [tsan] Separate the constants in libignore and bump the maximum for instrumented libraries 2018-01-04 02:28:51 +00:00
sanitizer_linux.cc [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_linux.h [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_linux_libcdep.cc [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_linux_mips64.S [ESan][MIPS] Adds support for MIPS64 2016-10-06 09:58:11 +00:00
sanitizer_linux_s390.cc [sanitizer] [SystemZ] Update CVE-2016-2143 check for Ubuntu 16.04 2017-05-24 15:06:33 +00:00
sanitizer_linux_x86_64.S [sanitizer][esan] Add internal_sigaction_syscall 2016-06-14 15:15:38 +00:00
sanitizer_list.h Whenever reasonable, merge ASAN quarantine batches to save memory. 2017-01-19 22:15:54 +00:00
sanitizer_mac.cc [sanitizer] Introduce a vDSO aware timing function 2017-12-13 16:23:54 +00:00
sanitizer_mac.h [compiler-rt] Fix const and volatile qualifier warnings 2017-11-10 21:19:20 +00:00
sanitizer_mac_libcdep.cc (NFC) Rename GetMax{,User}VirtualAddress. 2017-11-07 23:51:22 +00:00
sanitizer_malloc_mac.inc Free zone name when destroying malloc zone 2017-04-13 14:00:24 +00:00
sanitizer_mutex.h [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_persistent_allocator.cc
sanitizer_persistent_allocator.h [sanitizer] Fix Clang-tidy modernize-use-nullptr warnings in lib/sanitizer_common headers, unify closing inclusion guards. Patch by Eugene Zelenko 2015-09-29 18:23:36 +00:00
sanitizer_placement_new.h
sanitizer_platform.h [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_platform_interceptors.h Add new interceptors for pwcache(3)-style functions 2018-01-18 10:53:27 +00:00
sanitizer_platform_limits_linux.cc [sanitizer] Add a bunch of ifdefs for sparc targets to avoid build failures. 2016-12-02 08:07:35 +00:00
sanitizer_platform_limits_netbsd.cc Correct NetBSD support in pthread_once(3)/TSan 2017-11-21 09:36:07 +00:00
sanitizer_platform_limits_netbsd.h Correct the setitimer interceptor on NetBSD 2018-01-12 20:45:56 +00:00
sanitizer_platform_limits_posix.cc [asan] Fix build with Android NDK < 14. 2018-01-04 19:47:55 +00:00
sanitizer_platform_limits_posix.h Correct the setitimer interceptor on NetBSD 2018-01-12 20:45:56 +00:00
sanitizer_platform_limits_solaris.cc [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_platform_limits_solaris.h Correct the setitimer interceptor on NetBSD 2018-01-12 20:45:56 +00:00
sanitizer_posix.cc [compiler-rt] Cleanup SignalContext initialization 2017-09-14 02:48:41 +00:00
sanitizer_posix.h [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_posix_libcdep.cc [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_printf.cc [sanitizer] Move CommonSanitizerReportMutex from _print.cc to _common.cc 2017-09-22 18:31:37 +00:00
sanitizer_procmaps.h [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_procmaps_common.cc [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_procmaps_freebsd.cc Removed platform-specific ifdefs from sanitizer_procmaps.h 2017-09-22 17:48:24 +00:00
sanitizer_procmaps_linux.cc [LSan] Fix one source of stale segments in the process memory mapping. 2017-11-28 22:15:27 +00:00
sanitizer_procmaps_mac.cc [compiler-rt] Fix const and volatile qualifier warnings 2017-11-10 21:19:20 +00:00
sanitizer_procmaps_solaris.cc [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_quarantine.h [Sanitizers] New sanitizer API to purge allocator quarantine. 2017-10-23 17:12:07 +00:00
sanitizer_report_decorator.h [compiler-rt] Move dump_instruction_bytes and dump_registers into sanitizer_common 2017-09-13 06:24:59 +00:00
sanitizer_signal_interceptors.inc Handle symbol renaming of sigaction for NetBSD 2017-11-28 10:54:58 +00:00
sanitizer_solaris.cc [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_stackdepot.cc rename InternalBinarySearch to InternalLowerBound 2016-11-18 20:48:52 +00:00
sanitizer_stackdepot.h [sanitizer] Fix Clang-tidy modernize-use-nullptr warnings in lib/sanitizer_common headers, unify closing inclusion guards. Patch by Eugene Zelenko 2015-09-29 18:23:36 +00:00
sanitizer_stackdepotbase.h [sanitizer] Fix Clang-tidy modernize-use-nullptr warnings in lib/sanitizer_common headers, unify closing inclusion guards. Patch by Eugene Zelenko 2015-09-29 18:23:36 +00:00
sanitizer_stacktrace.cc Revert "[PowerPC] Fix sanitizer frame unwind on 32-bit ABIs" 2017-03-17 01:15:39 +00:00
sanitizer_stacktrace.h [sanitizer] Add BufferedStackTrace::Reset() 2017-09-14 03:06:35 +00:00
sanitizer_stacktrace_libcdep.cc Do not crash with missing symbolication when running in DEDUP mode 2017-07-10 20:06:06 +00:00
sanitizer_stacktrace_printer.cc Add DemangleFunctionName for backtracing on NetBSD 2017-11-20 18:06:26 +00:00
sanitizer_stacktrace_printer.h [sanitizer] Use architecture/slice information when symbolizing fat Mach-O files on Darwin 2017-01-06 21:45:05 +00:00
sanitizer_stoptheworld.h Update suspended threads info to be compatible with darwin 2017-04-17 20:29:38 +00:00
sanitizer_stoptheworld_linux_libcdep.cc [tsan] Use __sanitizer_siginfo from sanitizer_common 2017-11-10 04:27:47 +00:00
sanitizer_stoptheworld_mac.cc [sanitizer] Remove use of task_for_pid from sanitizer_stoptheworld_mac.cc 2017-08-07 18:07:20 +00:00
sanitizer_suppressions.cc [sanitizer_common] Disable filesystem-related code for Fuchsia 2017-08-01 21:28:39 +00:00
sanitizer_suppressions.h [UBSan] Implement runtime suppressions (PR25066). 2015-12-18 19:56:42 +00:00
sanitizer_symbolizer.cc Invalidate symbolizer module list from dlopen/dlclose interceptors 2017-09-26 16:12:56 +00:00
sanitizer_symbolizer.h Add support for custom loaders to the sanitizer symbolizer 2017-10-02 20:22:16 +00:00
sanitizer_symbolizer_fuchsia.cc [Fuchsia] Magenta -> Zircon 2017-09-13 01:18:15 +00:00
sanitizer_symbolizer_internal.h [sanitizer_common] Move filesystem-related code out of sanitizer_common.cc 2017-07-22 01:46:40 +00:00
sanitizer_symbolizer_libbacktrace.cc [sanitizer] Fix sanitizer_common compile errors on gcc trunk 2017-11-07 20:10:17 +00:00
sanitizer_symbolizer_libbacktrace.h Provide missing Internal{Alloc, Free} declarations for libbacktrace symbolizer. 2015-10-07 23:13:28 +00:00
sanitizer_symbolizer_libcdep.cc Add support for custom loaders to the sanitizer symbolizer 2017-10-02 20:22:16 +00:00
sanitizer_symbolizer_mac.cc [compiler-rt] Remove the system includes from __sanitizer namespace 2016-09-15 21:02:22 +00:00
sanitizer_symbolizer_mac.h
sanitizer_symbolizer_posix_libcdep.cc Plug dlerror() leak for swift_demangle 2017-11-25 16:47:20 +00:00
sanitizer_symbolizer_win.cc [asan/win] Delay load dbghelp.dll to delay ucrtbase.dll initialization 2016-11-14 17:37:50 +00:00
sanitizer_syscall_generic.inc [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_syscall_linux_aarch64.inc Try to unbreak Linux sanitizers 2017-10-25 17:56:36 +00:00
sanitizer_syscall_linux_arm.inc [sanitizer] Asm implementation of syscall() for arm32. 2017-11-08 00:15:12 +00:00
sanitizer_syscall_linux_x86_64.inc Try to unbreak Linux sanitizers 2017-10-25 17:56:36 +00:00
sanitizer_termination.cc [sanitizer] Move termination functions in their own file 2016-05-27 21:57:17 +00:00
sanitizer_thread_registry.cc Prevent Thread Exited/Joined events race 2017-11-26 20:20:42 +00:00
sanitizer_thread_registry.h Prevent Thread Exited/Joined events race 2017-11-26 20:20:42 +00:00
sanitizer_tls_get_addr.cc [compiler-rt] Replace VPrintf with VReport in sanitizer_tls_get_addr.cc 2017-07-20 01:36:16 +00:00
sanitizer_tls_get_addr.h [lsan] Avoid segfaults during threads destruction under high load 2017-04-06 07:42:27 +00:00
sanitizer_unwind_linux_libcdep.cc [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
sanitizer_vector.h Move __tsan::Vector to __sanitizer 2017-12-04 12:30:09 +00:00
sanitizer_win.cc [sanitizer] Introduce a vDSO aware timing function 2017-12-13 16:23:54 +00:00
sanitizer_win.h [sanitizer_common] Don't provide sanitizer_procmaps API functions where not defined 2017-09-25 20:48:51 +00:00
sanitizer_win_defs.h [sanitizer] if WINAPI is already defined, do not redefine it 2017-02-08 18:34:05 +00:00
sanitizer_win_dll_thunk.cc [sanitizer] Intercept weak functions in dll_thunks. 2017-02-02 23:01:34 +00:00
sanitizer_win_dll_thunk.h [compiler-rt][asan] Fix incorrect macro preventing ICF with MSVC 2017-02-21 20:04:47 +00:00
sanitizer_win_dynamic_runtime_thunk.cc [sanitizer] Add dynamic_runtime_thunk for different sanitizers. 2017-02-02 23:01:41 +00:00
sanitizer_win_weak_interception.cc [sanitizer] Fix sanitizer_common compile errors on gcc trunk 2017-11-07 20:10:17 +00:00
sanitizer_win_weak_interception.h [sanitizer] Use interception to access to strong definitions in the executable. 2017-02-02 23:02:11 +00:00
weak_symbols.txt [sanitizer] Define as weak, functions that are declared as weak. 2017-01-31 20:23:14 +00:00