[msan] Add one more test for the handling of stack origins.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223229 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Fix stale_stack_leak.cc test in ASan-UAR mode.

This test does an intentional use-after-return, but this is not the focus of
the test, so ignore it.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223230 91177308-0d34-0410-b5e6-96231b3b80d8
[msan] Change the way origin ids are built.

Previously, all origin ids were "chained" origins, i.e values of
ChainedOriginDepot. This added a level of indirection for simple
stack and heap allocation, which were represented as chains of
length 1. This costs both RAM and CPU, but provides a joined 2**29
origin id space. It also made function (any instrumented function)
entry non-async-signal-safe, but that does not really matter because
memory stores in track-origins=2 mode are not async-signal-safe anyway.

With this change, the type of the origin is encoded in origin id.
See comment in msan_origin.h for more details. This reduces chained and stack
origin id range to 2**28 each, but leaves extra 2**31 for heap origins.

This change should not have any user-visible effects.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223233 91177308-0d34-0410-b5e6-96231b3b80d8