diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-12-04 01:38:15 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-12-04 01:38:15 +0000 |
commit | d4b5db8cb8a7a13bb5cc1d4ce53e8e088303c854 (patch) | |
tree | b79200d3544deb3a33815de2fee61cdad8eaba96 /include | |
parent | ad91267d45fef531c1082ab7974e4cc78aba5280 (diff) | |
download | compiler-rt-d4b5db8cb8a7a13bb5cc1d4ce53e8e088303c854.tar.gz compiler-rt-d4b5db8cb8a7a13bb5cc1d4ce53e8e088303c854.tar.bz2 compiler-rt-d4b5db8cb8a7a13bb5cc1d4ce53e8e088303c854.tar.xz |
ASan: add new interface functions - __asan_(un)poison_stack_memory. Calls to these functions are inserted by the instrumentation pass in use-after-scope mode
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169201 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/sanitizer/asan_interface.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/sanitizer/asan_interface.h b/include/sanitizer/asan_interface.h index 788e90f4..a09c6b2a 100644 --- a/include/sanitizer/asan_interface.h +++ b/include/sanitizer/asan_interface.h @@ -66,6 +66,15 @@ extern "C" { void __asan_stack_free(uptr ptr, uptr size, uptr real_stack) SANITIZER_INTERFACE_ATTRIBUTE; + // These two functions are used by instrumented code in the + // use-after-scope mode. They mark memory for local variables as + // unaddressable when they leave scope and addressable before the + // function exits. + void __asan_poison_stack_memory(uptr addr, uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + void __asan_unpoison_stack_memory(uptr addr, uptr size) + SANITIZER_INTERFACE_ATTRIBUTE; + // Marks memory region [addr, addr+size) as unaddressable. // This memory must be previously allocated by the user program. Accessing // addresses in this region from instrumented code is forbidden until |