summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-02 21:45:34 +0000
committerH.J. Lu <hjl.tools@gmail.com>2016-05-03 05:17:05 -0700
commit1e9196638ef43b47af891fc2a8912fcc3b27377c (patch)
treee2f28310f221742a9508d2dce46b3a28d3b10590
parent9745ea74f784f909c10f6b4f756be929f55edf34 (diff)
downloadgcc-hjl/pr70155/gcc-6-branch.tar.gz
Backport r265322 from llvm upstreamhjl/pr70155/gcc-6-branch
Since x86 psABIs require the function incoming stack must align at 16 bytes, child process stack passed to clone should be aligned at 16 bytes. PR testsuite/70520 * c-c++-common/asan/clone-test-1.c (main): Align child process stack to 16 bytes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235790 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/c-c++-common/asan/clone-test-1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/c-c++-common/asan/clone-test-1.c b/gcc/testsuite/c-c++-common/asan/clone-test-1.c
index fd187aaadd2..eeca09f3e68 100644
--- a/gcc/testsuite/c-c++-common/asan/clone-test-1.c
+++ b/gcc/testsuite/c-c++-common/asan/clone-test-1.c
@@ -25,7 +25,7 @@ volatile int zero = 0;
int main(int argc, char **argv) {
int i;
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, 0, 0, 0);