summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/cygtls_padsize.h
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-07-29 13:32:29 +0200
committerCorinna Vinschen <corinna@vinschen.de>2015-07-29 13:32:29 +0200
commit6ab56bdd3f92982fcb9e7d093c3fd1b56c2b306f (patch)
tree5b2e82f0b7a5f36ae4451e0416fb8fabee626b0e /winsup/cygwin/cygtls_padsize.h
parent9753bc33335b08426d6d85c5d833f40c5401c649 (diff)
downloadcygnal-6ab56bdd3f92982fcb9e7d093c3fd1b56c2b306f.tar.gz
cygnal-6ab56bdd3f92982fcb9e7d093c3fd1b56c2b306f.tar.bz2
cygnal-6ab56bdd3f92982fcb9e7d093c3fd1b56c2b306f.zip
cygwin: Fix crashes under AllocationPreference=0x100000 condition
* cygtls.h: Include cygtls_padsize.h and define CYGTLS_PADSIZE there. * cygtls_padsize.h: New file. Define CYGTLS_PADSIZE. * environ.cc (parse_options): Fix NULL pointer access. * init.cc (threadfunc_fe): Do not force stack align on x86_64. * strace.cc (main2): Rename from main. (main): Make room for _cygtls area on stack and just call main2. Add comment to explain why. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/cygtls_padsize.h')
-rw-r--r--winsup/cygwin/cygtls_padsize.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/winsup/cygwin/cygtls_padsize.h b/winsup/cygwin/cygtls_padsize.h
new file mode 100644
index 000000000..c1782c586
--- /dev/null
+++ b/winsup/cygwin/cygtls_padsize.h
@@ -0,0 +1,14 @@
+/* cygtls_padsize.h: Extra file to be included from utils.
+
+ Copyright 2015 Red Hat, Inc.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+/* FIXME: Find some way to autogenerate this value */
+#ifdef __x86_64__
+const int CYGTLS_PADSIZE = 12800; /* Must be 16-byte aligned */
+#else
+const int CYGTLS_PADSIZE = 12700;
+#endif