aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/cygtls.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.h
parent9753bc33335b08426d6d85c5d833f40c5401c649 (diff)
downloadnewlib-6ab56bdd3f92982fcb9e7d093c3fd1b56c2b306f.zip
newlib-6ab56bdd3f92982fcb9e7d093c3fd1b56c2b306f.tar.gz
newlib-6ab56bdd3f92982fcb9e7d093c3fd1b56c2b306f.tar.bz2
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.h')
-rw-r--r--winsup/cygwin/cygtls.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h
index 91ed4d4..c8615af 100644
--- a/winsup/cygwin/cygtls.h
+++ b/winsup/cygwin/cygtls.h
@@ -271,12 +271,7 @@ private:
};
#pragma pack(pop)
-/* 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
+#include "cygtls_padsize.h"
/*gentls_offsets*/