summaryrefslogtreecommitdiff
path: root/lib/msan/msan.h
diff options
context:
space:
mode:
authorAlex Shlyapnikov <alekseys@google.com>2017-07-18 19:11:04 +0000
committerAlex Shlyapnikov <alekseys@google.com>2017-07-18 19:11:04 +0000
commit13c2d08571baab9982f01acb1d302049bdace581 (patch)
treed284ec82188f89173bb52f4872c811dd5d02f733 /lib/msan/msan.h
parente726963d587b1d95320da4f5f05cd563e36eb8fe (diff)
[Sanitizers] ASan/MSan/LSan allocators set errno on failure.
Summary: ASan/MSan/LSan allocators set errno on allocation failures according to malloc/calloc/etc. expected behavior. MSan allocator was refactored a bit to make its structure more similar with other allocators. Also switch Scudo allocator to the internal errno definitions. TSan allocator changes will follow. Reviewers: eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D35275 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308344 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan.h')
-rw-r--r--lib/msan/msan.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/msan/msan.h b/lib/msan/msan.h
index 0709260ee..fa9c15b88 100644
--- a/lib/msan/msan.h
+++ b/lib/msan/msan.h
@@ -280,10 +280,18 @@ void InitializeInterceptors();
void MsanAllocatorInit();
void MsanAllocatorThreadFinish();
-void *MsanCalloc(StackTrace *stack, uptr nmemb, uptr size);
-void *MsanReallocate(StackTrace *stack, void *oldp, uptr size,
- uptr alignment, bool zeroise);
void MsanDeallocate(StackTrace *stack, void *ptr);
+
+void *msan_malloc(uptr size, StackTrace *stack);
+void *msan_calloc(uptr nmemb, uptr size, StackTrace *stack);
+void *msan_realloc(void *ptr, uptr size, StackTrace *stack);
+void *msan_valloc(uptr size, StackTrace *stack);
+void *msan_pvalloc(uptr size, StackTrace *stack);
+void *msan_aligned_alloc(uptr alignment, uptr size, StackTrace *stack);
+void *msan_memalign(uptr alignment, uptr size, StackTrace *stack);
+int msan_posix_memalign(void **memptr, uptr alignment, uptr size,
+ StackTrace *stack);
+
void InstallTrapHandler();
void InstallAtExitHandler();