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>
This commit is contained in:
14
winsup/cygwin/cygtls_padsize.h
Normal file
14
winsup/cygwin/cygtls_padsize.h
Normal file
@@ -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
|
Reference in New Issue
Block a user