summaryrefslogtreecommitdiff
path: root/lib/asan/asan_malloc_linux.cc
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-12-21 08:53:59 +0000
committerKostya Serebryany <kcc@google.com>2012-12-21 08:53:59 +0000
commitfe6d91684bcda766593800f6307233f1a33d31f6 (patch)
tree309fa82b7a4e10b4f11f37992eff2937ad3f74b7 /lib/asan/asan_malloc_linux.cc
parentd37c272621befc2f3b17c9e581ed970fbfbfae64 (diff)
[asan] add a flag alloc_dealloc_mismatch (off by default for now) which finds malloc/delete, new/free, new/delete[], etc mismatches
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_malloc_linux.cc')
-rw-r--r--lib/asan/asan_malloc_linux.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/asan/asan_malloc_linux.cc b/lib/asan/asan_malloc_linux.cc
index df94513a6..dabd9513f 100644
--- a/lib/asan/asan_malloc_linux.cc
+++ b/lib/asan/asan_malloc_linux.cc
@@ -61,12 +61,12 @@ using namespace __asan; // NOLINT
INTERCEPTOR(void, free, void *ptr) {
GET_STACK_TRACE_FREE;
- asan_free(ptr, &stack);
+ asan_free(ptr, &stack, FROM_MALLOC);
}
INTERCEPTOR(void, cfree, void *ptr) {
GET_STACK_TRACE_FREE;
- asan_free(ptr, &stack);
+ asan_free(ptr, &stack, FROM_MALLOC);
}
INTERCEPTOR(void*, malloc, uptr size) {
@@ -97,7 +97,7 @@ INTERCEPTOR(void*, realloc, void *ptr, uptr size) {
INTERCEPTOR(void*, memalign, uptr boundary, uptr size) {
GET_STACK_TRACE_MALLOC;
- return asan_memalign(boundary, size, &stack);
+ return asan_memalign(boundary, size, &stack, FROM_MALLOC);
}
INTERCEPTOR(void*, __libc_memalign, uptr align, uptr s)