[11/11] patch series to port ASAN for riscv64
These changes allow using ASAN on RISCV64 architecture.
The majority of existing tests are passing. With few exceptions (see below).
Tests we run on qemu and on "HiFive Unleashed" board.
Tests run:
Asan-riscv64-inline-Test - pass Asan-riscv64-inline-Noinst-Test - pass Asan-riscv64-calls-Noinst-Test - pass Asan-riscv64-calls-Test - pass
Lit tests:
RISCV64LinuxConfig (282 supported, few failures) RISCV64LinuxDynamicConfig (289 supported, few failures)
Lit failures:
TestCases/malloc_context_size.cpp - asan works, but backtrace misses some calls TestCases/Linux/malloc_delete_mismatch.cpp - asan works, but backtrace misses some calls TestCases/Linux/static_tls.cpp - "Can't guess glibc version" (under debugging) TestCases/asan_and_llvm_coverage_test.cpp - missing libclang_rt.profile-riscv64.a
These failures are under debugging currently and shall be addressed in a
subsequent commits.
Depends On D87581
I don't think we need the check for XLEN here. The condition result should be the same for RV32, and this doesn't need to wait for sanitizer support for riscv32.