diff options
author | Alex Shlyapnikov <alekseys@google.com> | 2018-03-28 19:53:55 +0000 |
---|---|---|
committer | Alex Shlyapnikov <alekseys@google.com> | 2018-03-28 19:53:55 +0000 |
commit | 85f074e7256b2a434f7663d56e9a11f21c466d5e (patch) | |
tree | 6906d667409e5ffa304d5b19c5625ba48f5869ac /test/asan/TestCases/Linux | |
parent | 85f6bace7a20b03d7a754d83a1b655b504eee0e3 (diff) | |
download | compiler-rt-85f074e7256b2a434f7663d56e9a11f21c466d5e.tar.gz |
[ASan] Add aligned_alloc declaration to aligned_alloc-alignment.cc test.
aligned_alloc is not always defined in headers.
Differential Revision: https://reviews.llvm.org/D44404
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/asan/TestCases/Linux')
-rw-r--r-- | test/asan/TestCases/Linux/aligned_alloc-alignment.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/asan/TestCases/Linux/aligned_alloc-alignment.cc b/test/asan/TestCases/Linux/aligned_alloc-alignment.cc index 618aa8af7..5483c766f 100644 --- a/test/asan/TestCases/Linux/aligned_alloc-alignment.cc +++ b/test/asan/TestCases/Linux/aligned_alloc-alignment.cc @@ -5,6 +5,8 @@ #include <stdio.h> #include <stdlib.h> +extern void *aligned_alloc (size_t alignment, size_t size); + int main() { void *p = aligned_alloc(17, 100); // CHECK: ERROR: AddressSanitizer: invalid allocation alignment: 17 |