diff options
| author | Alex Shlyapnikov <alekseys@google.com> | 2018-06-08 20:40:35 +0000 |
|---|---|---|
| committer | Alex Shlyapnikov <alekseys@google.com> | 2018-06-08 20:40:35 +0000 |
| commit | dcf0097962e4506aec59fbbd01c874527d2e061d (patch) | |
| tree | 1a41b71908299f93693d176a5cb9b94ea7a9de77 /compiler-rt/lib/lsan/lsan_interceptors.cc | |
| parent | 9e5eafbaa8ab0d49ccfd197a91b386e9aba28972 (diff) | |
| download | bcm5719-llvm-dcf0097962e4506aec59fbbd01c874527d2e061d.tar.gz bcm5719-llvm-dcf0097962e4506aec59fbbd01c874527d2e061d.zip | |
[Sanitizers] Check alignment != 0 for aligned_alloc and posix_memalign
Summary:
Move the corresponding tests to the common folder (as all of the
sanitizer allocators will support this feature soon) and add the checks
specific to aligned_alloc to ASan and LSan allocators.
Reviewers: vitalybuka
Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D47924
llvm-svn: 334316
Diffstat (limited to 'compiler-rt/lib/lsan/lsan_interceptors.cc')
| -rw-r--r-- | compiler-rt/lib/lsan/lsan_interceptors.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/lsan/lsan_interceptors.cc b/compiler-rt/lib/lsan/lsan_interceptors.cc index b076d11de57..e60b1ab7ccd 100644 --- a/compiler-rt/lib/lsan/lsan_interceptors.cc +++ b/compiler-rt/lib/lsan/lsan_interceptors.cc @@ -122,7 +122,7 @@ INTERCEPTOR(void *, __libc_memalign, uptr alignment, uptr size) { INTERCEPTOR(void*, aligned_alloc, uptr alignment, uptr size) { ENSURE_LSAN_INITED; GET_STACK_TRACE_MALLOC; - return lsan_memalign(alignment, size, stack); + return lsan_aligned_alloc(alignment, size, stack); } #define LSAN_MAYBE_INTERCEPT_ALIGNED_ALLOC INTERCEPT_FUNCTION(aligned_alloc) #else |

