[MSan] Enable MSAN for loongarch64
authorzhanglimin <zhanglimin@loongson.cn>
Thu, 29 Jun 2023 01:46:02 +0000 (09:46 +0800)
committerzhanglimin <zhanglimin@loongson.cn>
Thu, 29 Jun 2023 03:33:04 +0000 (11:33 +0800)
commit310a6f12b5b80f6b77d8551c53e0fc2a2844df07
treed637912958ebabbdb290d3efd6e473e7ac838884
parentc78acc92759cda8fc6ecb2690df39c7ee65355bf
[MSan] Enable MSAN for loongarch64

This patch adds basic memory sanitizer support for loongarch64
with 47-bit VMA, which memory layout is based on x86_64.

The LLVM part of the LoongArch memory sanitizer implementation will
be done separately, which will fix failing tests in check-msan.
These failing tests fail with the following same error: "error in
backend: unsupported architecture".

Reviewed By: #sanitizers, vitalybuka, MaskRay

Differential Revision: https://reviews.llvm.org/D140528
compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
compiler-rt/lib/msan/msan.h
compiler-rt/lib/msan/msan_allocator.cpp
compiler-rt/lib/msan/tests/msan_test.cpp
compiler-rt/test/msan/mmap.cpp
compiler-rt/test/msan/mmap_below_shadow.cpp
compiler-rt/test/msan/param_tls_limit.cpp
compiler-rt/test/msan/signal_stress_test.cpp
compiler-rt/test/msan/strlen_of_shadow.cpp
compiler-rt/test/msan/vararg.cpp