diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-11-01 15:53:25 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2013-11-01 15:53:25 +0000 |
commit | 21bf90dcf562bd05df20eb55b8d0559017574ffb (patch) | |
tree | 25f8195f7f488b61e2d8639c94ab7f3e062e55e0 | |
parent | bd65956821ebe3f4e1fb0b57892a5a443ad50c6f (diff) | |
download | compiler-rt-21bf90dcf562bd05df20eb55b8d0559017574ffb.tar.gz compiler-rt-21bf90dcf562bd05df20eb55b8d0559017574ffb.tar.bz2 compiler-rt-21bf90dcf562bd05df20eb55b8d0559017574ffb.tar.xz |
[msan] Check that address is an app region before printing shadow.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193863 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/msan/msan.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/msan/msan.cc b/lib/msan/msan.cc index 694733b7..2530fb11 100644 --- a/lib/msan/msan.cc +++ b/lib/msan/msan.cc @@ -372,6 +372,10 @@ void __msan_set_expect_umr(int expect_umr) { } void __msan_print_shadow(const void *x, uptr size) { + if (!MEM_IS_APP(x)) { + Printf("Not a valid application address: %p\n", x); + return; + } unsigned char *s = (unsigned char*)MEM_TO_SHADOW(x); u32 *o = (u32*)MEM_TO_ORIGIN(x); for (uptr i = 0; i < size; i++) { |