Fix GetFrameNameByAddr hitting stale stack guards.

In the current implementation AsanThread::GetFrameNameByAddr scans the
stack for a magic guard value to locate base address of the stack
frame. This is not reliable, especially on ARM, where the code that
stores this magic value has to construct it in a register from two
small intermediates; this register can then end up stored in a random
stack location in the prologue of another function.

With this change, GetFrameNameByAddr scans the shadow memory for the
signature of a left stack redzone instead. It is now possible to
remove the magic from the instrumentation pass for additional
performance gain. We keep it there for now just to make sure the new
algorithm does not fail in some corner case.


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