diff options
author | Sergey Matveev <earthdok@google.com> | 2014-03-21 10:12:17 +0000 |
---|---|---|
committer | Sergey Matveev <earthdok@google.com> | 2014-03-21 10:12:17 +0000 |
commit | 10611387bbadd3bc811b3bced9228b52b0e75dca (patch) | |
tree | da6472f68d876f7944eced51ca6d6b68a2277190 /include/sanitizer | |
parent | d754f1f61549c5f7014a64c42556f686e23b1891 (diff) |
[MSan] Add __msan_unpoison_string() to the public interface.
Using __msan_unpoison() on null-terminated strings is awkward because
strlen() can't be called on a poisoned string. This case warrants a special
interface function.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204448 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/sanitizer')
-rw-r--r-- | include/sanitizer/msan_interface.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/sanitizer/msan_interface.h b/include/sanitizer/msan_interface.h index 437fd02ae..cefc11af7 100644 --- a/include/sanitizer/msan_interface.h +++ b/include/sanitizer/msan_interface.h @@ -38,6 +38,10 @@ extern "C" { /* Make memory region fully initialized (without changing its contents). */ void __msan_unpoison(const volatile void *a, size_t size); + /* Make a null-terminated string fully initialized (without changing its + contents). */ + void __msan_unpoison_string(const volatile char *a); + /* Make memory region fully uninitialized (without changing its contents). */ void __msan_poison(const volatile void *a, size_t size); |