llvm-project/compiler-rt/lib/msan
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
..
tests [compiler-rt] Add common interceptor for wcrtomb. 2015-08-26 00:14:08 +00:00
CMakeLists.txt [CMake] Add ARCHS option to add_sanitizer_rt_symbols. 2015-08-27 20:07:54 +00:00
msan.cc [sanitizer] Move CheckVMASize after flag initialization 2015-09-15 13:22:54 +00:00
msan.h [MSan] Enable MSAN for aarch64 2015-09-16 15:12:25 +00:00
msan.syms.extra Export __ubsan_* symbols from MSan and TSan runtimes. 2015-04-28 01:20:34 +00:00
msan_allocator.cc [MSan] Enable MSAN for aarch64 2015-09-16 15:12:25 +00:00
msan_allocator.h [msan] Introduce MsanThread. Move thread-local allocator cache out of TLS. 2014-04-04 09:47:41 +00:00
msan_blacklist.txt [MSan] Add empty default blacklist for MSan 2013-05-21 13:55:56 +00:00
msan_chained_origin_depot.cc [msan] Change the way origin ids are built. 2014-12-03 13:58:40 +00:00
msan_chained_origin_depot.h [msan] Make origin tracking fork-safe. 2014-09-04 10:36:14 +00:00
msan_flags.h [sanitizer] Flag parser rewrite. 2015-01-15 15:13:43 +00:00
msan_flags.inc [Sanitizers] Unify the semantics and usage of "exitcode" runtime flag across all sanitizers. 2015-08-21 20:49:37 +00:00
msan_interceptors.cc [MSan] Enable MSAN for aarch64 2015-09-16 15:12:25 +00:00
msan_interface_internal.h [Sanitizers] Unify the semantics and usage of "exitcode" runtime flag across all sanitizers. 2015-08-21 20:49:37 +00:00
msan_linux.cc [Sanitizer] Dump coverage if we're killing the program with __sanitizer::Die(). 2015-08-24 22:21:47 +00:00
msan_new_delete.cc -Wdeprecated: Use noexcept rather than throw() where supported 2015-08-10 15:24:22 +00:00
msan_origin.h [msan] Fix MsanTest to pass in track_origins=2 mode. 2015-02-26 15:19:33 +00:00
msan_poisoning.cc [msan] Fix SetShadow for mappings at the end of the application address space 2015-06-25 20:47:59 +00:00
msan_poisoning.h [msan] Refactor shadow operations. 2015-01-21 16:42:30 +00:00
msan_report.cc [Sanitizer] Be consistent about separating ==%PID== and logged data. 2015-03-31 18:16:42 +00:00
msan_thread.cc [asan] Fix SanitizerCommon.PthreadDestructorIterations test on Android L. 2015-06-29 20:28:55 +00:00
msan_thread.h [msan] Disable chained origins in signal handlers. 2014-04-23 14:01:57 +00:00