hanchenye-llvm-project/compiler-rt
Peter Collingbourne 21a1814417 hwasan: Untag unwound stack frames by wrapping personality functions.
One problem with untagging memory in landing pads is that it only works
correctly if the function that catches the exception is instrumented.
If the function is uninstrumented, we have no opportunity to untag the
memory.

To address this, replace landing pad instrumentation with personality function
wrapping. Each function with an instrumented stack has its personality function
replaced with a wrapper provided by the runtime. Functions that did not have
a personality function to begin with also get wrappers if they may be unwound
past. As the unwinder calls personality functions during stack unwinding,
the original personality function is called and the function's stack frame is
untagged by the wrapper if the personality function instructs the unwinder
to keep unwinding. If unwinding stops at a landing pad, the function is
still responsible for untagging its stack frame if it resumes unwinding.

The old landing pad mechanism is preserved for compatibility with old runtimes.

Differential Revision: https://reviews.llvm.org/D66377

llvm-svn: 369721
2019-08-23 01:28:44 +00:00
..
cmake reland [gtest] Fix printing of StringRef and SmallString in assert messages. 2019-08-21 13:56:29 +00:00
docs
include [compiler-rt] FuzzedDataProvider: use C++ headers only instead of a C/C++ mix. 2019-08-09 16:00:53 +00:00
lib hwasan: Untag unwound stack frames by wrapping personality functions. 2019-08-23 01:28:44 +00:00
test hwasan: Untag unwound stack frames by wrapping personality functions. 2019-08-23 01:28:44 +00:00
unittests [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.* 2019-06-27 20:56:04 +00:00
utils Update generate_netbsd_ioctls.awk for NetBSD 9.99.3 2019-08-08 02:08:23 +00:00
www Adjust documentation for git migration. 2019-01-29 16:37:27 +00:00
.arcconfig
.gitignore
CMakeLists.txt [Sanitizer] Disable -Wframe-larger-than on SystemZ 2019-08-21 15:53:08 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
README.txt

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================