[PATCH] D55684: Windows ASan: Instrument _msize_base()
Vlad Tsyrklevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 13 16:42:45 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT349115: Windows ASan: Instrument _msize_base() (authored by vlad.tsyrklevich, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D55684?vs=178157&id=178161#toc
Repository:
rCRT Compiler Runtime
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55684/new/
https://reviews.llvm.org/D55684
Files:
lib/asan/asan_malloc_win.cc
lib/asan/asan_win_dll_thunk.cc
Index: lib/asan/asan_win_dll_thunk.cc
===================================================================
--- lib/asan/asan_win_dll_thunk.cc
+++ lib/asan/asan_win_dll_thunk.cc
@@ -48,6 +48,7 @@
INTERCEPT_WRAP_W_WWW(_recalloc_base)
INTERCEPT_WRAP_W_W(_msize)
+INTERCEPT_WRAP_W_W(_msize_base)
INTERCEPT_WRAP_W_W(_expand)
INTERCEPT_WRAP_W_W(_expand_dbg)
Index: lib/asan/asan_malloc_win.cc
===================================================================
--- lib/asan/asan_malloc_win.cc
+++ lib/asan/asan_malloc_win.cc
@@ -141,6 +141,11 @@
}
ALLOCATION_FUNCTION_ATTRIBUTE
+size_t _msize_base(void *ptr) {
+ return _msize(ptr);
+}
+
+ALLOCATION_FUNCTION_ATTRIBUTE
void *_expand(void *memblock, size_t size) {
// _expand is used in realloc-like functions to resize the buffer if possible.
// We don't want memory to stand still while resizing buffers, so return 0.
@@ -235,6 +240,7 @@
TryToOverrideFunction("_recalloc_base", (uptr)_recalloc);
TryToOverrideFunction("_recalloc_crt", (uptr)_recalloc);
TryToOverrideFunction("_msize", (uptr)_msize);
+ TryToOverrideFunction("_msize_base", (uptr)_msize);
TryToOverrideFunction("_expand", (uptr)_expand);
TryToOverrideFunction("_expand_base", (uptr)_expand);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55684.178161.patch
Type: text/x-patch
Size: 1239 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181214/916605df/attachment.bin>
More information about the llvm-commits
mailing list