summaryrefslogtreecommitdiff
path: root/test/asan
diff options
context:
space:
mode:
authorAlex Shlyapnikov <alekseys@google.com>2018-03-28 19:53:55 +0000
committerAlex Shlyapnikov <alekseys@google.com>2018-03-28 19:53:55 +0000
commit85f074e7256b2a434f7663d56e9a11f21c466d5e (patch)
tree6906d667409e5ffa304d5b19c5625ba48f5869ac /test/asan
parent85f6bace7a20b03d7a754d83a1b655b504eee0e3 (diff)
[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')
-rw-r--r--test/asan/TestCases/Linux/aligned_alloc-alignment.cc2
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