diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2014-09-17 17:56:15 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-09-17 17:56:15 +0000 |
commit | 1947bf99217a233bc7f147de19738f77845ec8b8 (patch) | |
tree | beb627e464b6661ede6ac5bbb56cc31350b0e9b9 /llvm/tools/llvm-cov/SourceCoverageDataManager.cpp | |
parent | d122211e60ec211e6cb0fb435ae2e6d38e1e5fda (diff) | |
download | bcm5719-llvm-1947bf99217a233bc7f147de19738f77845ec8b8.tar.gz bcm5719-llvm-1947bf99217a233bc7f147de19738f77845ec8b8.zip |
PR20721: Don't let UBSan print inaccessible memory
Summary:
UBSan needs to check if memory snippet it's going to print resides
in addressable memory. Similar check might be helpful in ASan with
dump_instruction_bytes option (see http://reviews.llvm.org/D5167).
Instead of scanning /proc/self/maps manually, delegate this check to
the OS kernel: try to write this memory in a syscall and assume that
memory is inaccessible if the syscall failed (e.g. with EFAULT).
Fixes PR20721.
Test Plan: compiler-rt test suite
Reviewers: eugenis, glider
Reviewed By: glider
Subscribers: emaste, ygribov, llvm-commits, glider, rsmith
Differential Revision: http://reviews.llvm.org/D5253
llvm-svn: 217971
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageDataManager.cpp')
0 files changed, 0 insertions, 0 deletions