From 5e263ef18766b562a05aa6736d6c7ea3c8af3b4e Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 4 Apr 2016 18:27:32 +0000 Subject: Apply suggestion from HJ Lu to avoid misaligned stack in test Fixes PR27191 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@265322 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/asan/TestCases/Linux/clone_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/asan/TestCases/Linux/clone_test.cc b/test/asan/TestCases/Linux/clone_test.cc index e9c1f166e..f6eb26100 100644 --- a/test/asan/TestCases/Linux/clone_test.cc +++ b/test/asan/TestCases/Linux/clone_test.cc @@ -22,7 +22,7 @@ int Child(void *arg) { int main(int argc, char **argv) { const int kStackSize = 1 << 20; - char child_stack[kStackSize + 1]; + char __attribute__((aligned(16))) child_stack[kStackSize + 1]; char *sp = child_stack + kStackSize; // Stack grows down. printf("Parent: %p\n", sp); pid_t clone_pid = clone(Child, sp, CLONE_FILES | CLONE_VM, NULL); -- cgit v1.2.3