llvm-project/compiler-rt/lib/sanitizer_common
Adhemerval Zanella 19074450ee [MSan] Enable MSAN for aarch64
This patch enabled msan for aarch64 with 39-bit VMA and 42-bit VMA.
As defined by lib/msan/msan.h the memory layout used is for 39-bit is:

   00 0000 0000 - 40 0000 0000:  invalid
   40 0000 0000 - 43 0000 0000:  shadow
   43 0000 0000 - 46 0000 0000:  origin
   46 0000 0000 - 55 0000 0000:  invalid
   55 0000 0000 - 56 0000 0000:  app (low)
   56 0000 0000 - 70 0000 0000:  invalid
   70 0000 0000 - 80 0000 0000:  app (high)

And for 42-bit VMA:

   000 0000 0000 - 100 0000 0000:  invalid
   100 0000 0000 - 11b 0000 0000:  shadow
   11b 0000 0000 - 120 0000 0000:  invalid
   120 0000 0000 - 13b 0000 0000:  origin
   13b 0000 0000 - 2aa 0000 0000:  invalid
   2aa 0000 0000 - 2ab 0000 0000:  app (low)
   2ab 0000 0000 - 3f0 0000 0000:  invalid
   3f0 0000 0000 - 400 0000 0000:  app (high)

Most of tests are passing with exception of:

   * Linux/mallinfo.cc
   * chained_origin_limits.cc
   * dlerror.cc
   * param_tls_limit.cc
   * signal_stress_test.cc
   * nonnull-arg.cpp

The 'Linux/mallinfo.cc' is due the fact AArch64 returns the sret in 'x8'
instead of default first argument 'x1'.  So a function prototype that
aims  to mimic (by using first argument as the return of function) won't
work. For GCC one can make a register alias (register var asm ("r8")), but
for clang it detects is an unused variable and generate wrong code.

The 'chained_origin_limits' is probably due a wrong code generation,
since it fails only when origin memory is used
(-fsanitize-memory-track-origins=2) and only in the returned code
(return buf[50]).

The 'signal_streess_test' and 'nonnull-arg' are due currently missing variadic
argument handling in memory sanitizer code instrumentation on LLVM side.

Both 'dlerror' and 'param_tls_test' are unknown failures that require
further investigation.

All the failures are XFAIL for aarch64 for now.

llvm-svn: 247809
2015-09-16 15:12:25 +00:00
..
scripts [asan] Add new(unsigned int) to ASan interface list. 2015-05-28 20:37:50 +00:00
tests [asan] Disable ThreadSelfTest on Android. 2015-09-08 19:32:37 +00:00
CMakeLists.txt [CMake] Unify build rules for sanitizer_common for Apple and non-Apple platforms. 2015-08-27 22:23:27 +00:00
Makefile.mk [autoconf] Properly exclude sanitizer_common nolibc sources from build. 2015-08-24 19:38:59 +00:00
sanitizer_addrhashmap.h Fix typos 2014-05-15 02:22:34 +00:00
sanitizer_allocator.cc [Sanitizer] Introduce Allocator::may_return_null bool flag. 2014-12-12 20:07:35 +00:00
sanitizer_allocator.h [compiler-rt] [tsan] Enable TSan for AArch64/42-bit VMA 2015-08-28 20:40:50 +00:00
sanitizer_allocator_interface.h Generalize sanitizer allocator public interface. 2014-07-07 17:39:31 +00:00
sanitizer_allocator_internal.h [sanitizer] Flag parser rewrite. 2015-01-15 15:13:43 +00:00
sanitizer_asm.h [sanitizer] support toolchains that don't understand CFI directives 2013-12-05 07:44:35 +00:00
sanitizer_atomic.h tsan: speed up race deduplication 2015-09-03 11:20:46 +00:00
sanitizer_atomic_clang.h asan: fix atomic operations on ARM 2014-01-22 14:13:37 +00:00
sanitizer_atomic_clang_other.h [sanitizer] fix for ARM Linux, patch by Maxim Ostapenko 2014-05-13 08:01:59 +00:00
sanitizer_atomic_clang_x86.h asan: fix atomic operations on ARM 2014-01-22 14:13:37 +00:00
sanitizer_atomic_msvc.h Re-apply r241217 with build fixes: 2015-07-02 01:44:34 +00:00
sanitizer_bitvector.h Fix MSVS warnings in the sanitizers RTL 2014-03-12 14:09:25 +00:00
sanitizer_bvgraph.h [sanitizer] speed up the bitvector-based deadlock detector by ~15% (iterate over the currently held locks using the array, not the bitvector. Bitvector is not the best data structure to iterate over) 2014-03-31 07:23:50 +00:00
sanitizer_common.cc [Sanitizers] Make abort_on_error common flag. 2015-08-27 20:40:24 +00:00
sanitizer_common.h [compiler-rt] [sanitizers] Add VMA size check at runtime 2015-09-11 13:55:00 +00:00
sanitizer_common_interceptors.inc [asan] Fix the freopen interceptor to allow NULL instead of a filename 2015-08-31 12:41:55 +00:00
sanitizer_common_interceptors_format.inc [ubsan] handle long double in 32-bit mode; part of the patch by Marek Polacek 2014-05-23 14:45:13 +00:00
sanitizer_common_interceptors_ioctl.inc [Msan] Fix the ioctl_custom.cc test to pass on FreeBSD 2015-05-06 09:28:48 +00:00
sanitizer_common_libcdep.cc [Sanitizer RT] Get rid of internal_isatty 2015-04-08 17:42:57 +00:00
sanitizer_common_nolibc.cc [Sanitizers] Make abort_on_error common flag. 2015-08-27 20:40:24 +00:00
sanitizer_common_syscalls.inc [MSan] Enable MSAN for aarch64 2015-09-16 15:12:25 +00:00
sanitizer_coverage_libcdep.cc [Sanitizer] Dump coverage if we're killing the program with __sanitizer::Die(). 2015-08-24 22:21:47 +00:00
sanitizer_coverage_mapping_libcdep.cc Use error_t rather than int in a couple of places where we handle files 2015-04-09 14:49:53 +00:00
sanitizer_deadlock_detector.h tsan: fix deadlock reporting 2014-12-18 14:05:34 +00:00
sanitizer_deadlock_detector1.cc Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:44:24 +00:00
sanitizer_deadlock_detector2.cc tsan: remove unnecessary line split 2014-07-08 13:07:23 +00:00
sanitizer_deadlock_detector_interface.h [sanitizer] print threads in deadlock report 2014-03-21 13:00:18 +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] Implement include_if_exists with process name substitution. 2015-07-21 23:03:13 +00:00
sanitizer_flags.cc [asan] Read process name from /proc/self/cmdline on Linux. 2015-07-28 20:27:51 +00:00
sanitizer_flags.h [sanitizer] Implement include_if_exists with process name substitution. 2015-07-21 23:03:13 +00:00
sanitizer_flags.inc [Sanitizers] Make abort_on_error common flag. 2015-08-27 20:40:24 +00:00
sanitizer_freebsd.h Support getting process maps for sanitizers needs on FreeBSD in 32-bit mode 2014-08-08 06:21:09 +00:00
sanitizer_interface_internal.h [Sanitizers] Move the common sanitizer interface from sanitizer_internal_defs.h to a new sanitizer_interface_internal.h file 2015-02-19 15:15:33 +00:00
sanitizer_internal_defs.h -Wdeprecated: Use noexcept rather than throw() where supported 2015-08-10 15:24:22 +00:00
sanitizer_lfstack.h
sanitizer_libc.cc [compiler-rt] Make MaybeReexec properly process DYLD_INSERT_LIBRARIES when using non-absolute paths 2015-02-06 12:07:29 +00:00
sanitizer_libc.h [ASan/Win] Add more support for file operations 2015-04-09 15:25:21 +00:00
sanitizer_libignore.cc Move more POSIX-specific functions to sanitizer_posix.h 2015-04-09 12:54:06 +00:00
sanitizer_libignore.h [Sanitizer] Drop LibIgnore dependency on SuppressionContext. NFC. 2015-02-19 22:56:49 +00:00
sanitizer_linux.cc [compiler-rt] [sanitizers] Add aarch64 syscall optimization support 2015-08-21 14:50:36 +00:00
sanitizer_linux.h [tsan] Enable tsan for aarch64 2015-08-05 15:17:59 +00:00
sanitizer_linux_libcdep.cc [asan] Disable ThreadSelfTest on Android. 2015-09-08 19:32:37 +00:00
sanitizer_list.h [Sanitizer] Remove the hardcoded limit of address ranges in LoadedModule. 2015-01-08 22:03:05 +00:00
sanitizer_mac.cc [sanitizer] Fix Mac build. 2015-07-28 21:01:42 +00:00
sanitizer_mac.h Working on reconciling out-of-tree patches to compiler-rt for building for iOS. 2015-06-23 21:39:49 +00:00
sanitizer_mutex.h [Sanitizer] Make BlockingMutex really linker initialized. 2015-01-30 06:20:43 +00:00
sanitizer_persistent_allocator.cc [msan] Chained origins re-design. 2014-05-21 09:02:13 +00:00
sanitizer_persistent_allocator.h [msan] Chained origins re-design. 2014-05-21 09:02:13 +00:00
sanitizer_placement_new.h Introduce an operator new for LowLevelAllocator, and convert most users to it. 2013-10-24 06:23:39 +00:00
sanitizer_platform.h [compiler-rt] [tsan] Enable TSan for AArch64/42-bit VMA 2015-08-28 20:40:50 +00:00
sanitizer_platform_interceptors.h [MSan] Enable MSAN for aarch64 2015-09-16 15:12:25 +00:00
sanitizer_platform_limits_linux.cc [asan] i686-linux-android support. 2014-07-03 14:20:56 +00:00
sanitizer_platform_limits_posix.cc [MSan] Enable MSAN for aarch64 2015-09-16 15:12:25 +00:00
sanitizer_platform_limits_posix.h [MSan] Enable MSAN for aarch64 2015-09-16 15:12:25 +00:00
sanitizer_posix.cc [compiler-rt] [sanitizers] Add VMA size check at runtime 2015-09-11 13:55:00 +00:00
sanitizer_posix.h Re-commit r243686 - [Sanitizers] [Bug 24151] Generalize type of offset in internal_mmap 2015-07-31 11:29:25 +00:00
sanitizer_posix_libcdep.cc [sanitizer] 2-nd attempt. Add the flag handle_sigfpe that is default true to handle SIGFPE crashes same as SIGSEV crashes, patch by Karl Skomski. This time the test is enabled only on x86-64 (it broke on ARM) 2015-08-06 17:52:54 +00:00
sanitizer_printf.cc [asan] Read process name from /proc/self/cmdline on Linux. 2015-07-28 20:27:51 +00:00
sanitizer_procmaps.h Segregate FreeBSD-specific parts from sanitizer_procmaps_linux.cc 2014-08-06 10:16:52 +00:00
sanitizer_procmaps_common.cc [Sanitizer] Teach ReadFileToBuffer to distinguish empty file from inaccessible file. 2015-07-17 23:50:08 +00:00
sanitizer_procmaps_freebsd.cc Support getting process maps for sanitizers needs on FreeBSD in 32-bit mode 2014-08-08 06:21:09 +00:00
sanitizer_procmaps_linux.cc [Sanitizer] Teach ReadFileToBuffer to distinguish empty file from inaccessible file. 2015-07-17 23:50:08 +00:00
sanitizer_procmaps_mac.cc [ASan] Unify handling of loaded modules between POSIX and Windows 2015-04-06 12:49:30 +00:00
sanitizer_quarantine.h [asan] add a flag soft_rss_limit_mb 2015-01-06 23:53:32 +00:00
sanitizer_report_decorator.h [Sanitizer] Merge AnsiColorDecorator and SanitizerCommonDecorator, use the latter in UBSan 2014-06-13 23:46:37 +00:00
sanitizer_stackdepot.cc [msan] Better use-after-free reports. 2015-01-22 13:33:16 +00:00
sanitizer_stackdepot.h Change StackDepot interface to use StackTrace more extensively 2014-10-26 06:23:07 +00:00
sanitizer_stackdepotbase.h [Sanitizer] Return code that calculates hash for stacktrace back to StackDepot implementation 2014-10-27 03:10:27 +00:00
sanitizer_stacktrace.cc Add commentary explaining PPC access to return address 2015-07-28 20:05:06 +00:00
sanitizer_stacktrace.h [MSan] Enable MSAN for aarch64 2015-09-16 15:12:25 +00:00
sanitizer_stacktrace_libcdep.cc [sanitizer] add #ifdefs around slow unwinder to fix OS X debug build 2015-07-02 13:56:37 +00:00
sanitizer_stacktrace_printer.cc tsan: don't print external PCs in reports 2015-06-24 13:04:12 +00:00
sanitizer_stacktrace_printer.h [sanitizer_common] Added VS-style output for source locations 2015-06-04 01:20:06 +00:00
sanitizer_stoptheworld.h asan: fix comment formatting 2015-03-06 08:43:44 +00:00
sanitizer_stoptheworld_linux_libcdep.cc [Sanitizers] Allow to install several internal Die callbacks. 2015-08-24 22:21:44 +00:00
sanitizer_suppressions.cc tsan: speed up race deduplication 2015-09-03 11:20:46 +00:00
sanitizer_suppressions.h tsan: speed up race deduplication 2015-09-03 11:20:46 +00:00
sanitizer_symbolizer.cc [Sanitizer] Get rid of PlatformGetListOfModules 2015-04-09 09:37:46 +00:00
sanitizer_symbolizer.h [Sanitizer] Merge POSIXSymbolizer and WinSymbolizer 2015-04-11 17:16:25 +00:00
sanitizer_symbolizer_internal.h Support inline functions symbolization in Addr2Line symbolizer. 2015-09-14 23:56:42 +00:00
sanitizer_symbolizer_libbacktrace.cc Symbolizer refactoring: Turn FillAddressAndModuleInfo into FillModuleInfo 2015-03-03 09:18:44 +00:00
sanitizer_symbolizer_libbacktrace.h Symbolizer refactoring: Make LibbacktraceSymbolizer adopt the SymbolizerTool interface 2015-03-02 22:56:25 +00:00
sanitizer_symbolizer_libcdep.cc [Windows] Use llvm-symbolizer before using dbghelp 2015-08-11 15:51:40 +00:00
sanitizer_symbolizer_mac.cc Speculative fix for Mac build 2015-08-11 16:30:27 +00:00
sanitizer_symbolizer_mac.h Adding the implementation of atos and dladdr symbolizers for OS X. 2015-03-12 10:53:18 +00:00
sanitizer_symbolizer_posix_libcdep.cc Support inline functions symbolization in Addr2Line symbolizer. 2015-09-14 23:56:42 +00:00
sanitizer_symbolizer_win.cc Add more error logging to win/asan 2015-08-13 20:10:54 +00:00
sanitizer_syscall_generic.inc Unix/BSD system calls are prefixed with SYS_ on FreeBSD and Mac 2015-02-22 22:01:09 +00:00
sanitizer_syscall_linux_aarch64.inc [compiler-rt] [sanitizers] Add aarch64 syscall optimization support 2015-08-21 14:50:36 +00:00
sanitizer_syscall_linux_x86_64.inc [FreeBSD] Port sanitizers' syscalls. 2014-03-07 10:03:54 +00:00
sanitizer_thread_registry.cc tsan: address comments in r214912 2014-09-02 09:34:34 +00:00
sanitizer_thread_registry.h tsan: address comments in r214912 2014-09-02 09:34:34 +00:00
sanitizer_tls_get_addr.cc [sanitizer] Recognize static TLS in __tls_get_addr interceptor. 2015-05-16 00:34:15 +00:00
sanitizer_tls_get_addr.h [sanitizer] Recognize static TLS in __tls_get_addr interceptor. 2015-05-16 00:34:15 +00:00
sanitizer_unwind_linux_libcdep.cc One more change required to build the sanitizers for iOS. 2015-06-24 20:13:44 +00:00
sanitizer_win.cc [compiler-rt] [sanitizers] Add VMA size check at runtime 2015-09-11 13:55:00 +00:00