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:
@ -25,8 +25,10 @@ static bool dll_finished_loading;
|
||||
static void WINAPI
|
||||
threadfunc_fe (VOID *arg)
|
||||
{
|
||||
#ifndef __x86_64__
|
||||
(void)__builtin_return_address(1);
|
||||
asm volatile ("andl $-16,%%esp" ::: "%esp");
|
||||
#endif
|
||||
_cygtls::call ((DWORD (*) (void *, void *)) TlsGetValue (_my_oldfunc), arg);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user