aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2016-05-02 21:45:34 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2016-05-02 14:45:34 -0700
commit50d94c29c00b00c0e569ec29b56715d8eb1c30af (patch)
tree978023aee1320169f9cc06ab30317171c48b67c4
parentbc1aee87f6494a59eea3ffbbb0577ccd85cdc4a1 (diff)
downloadgcc-50d94c29c00b00c0e569ec29b56715d8eb1c30af.zip
gcc-50d94c29c00b00c0e569ec29b56715d8eb1c30af.tar.gz
gcc-50d94c29c00b00c0e569ec29b56715d8eb1c30af.tar.bz2
backport: Since x86 psABIs require the function incoming stack must align at 16 bytes...
Backport r265322 from llvm upstream 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. From-SVN: r235790
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/c-c++-common/asan/clone-test-1.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4bd9f88..7bc4374 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2016-05-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR testsuite/70520
+ * c-c++-common/asan/clone-test-1.c (main): Align child process
+ stack to 16 bytes.
+
2016-05-02 David Malcolm <dmalcolm@redhat.com>
PR c++/62314
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 fd187aa..eeca09f 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);