From c0d45c01d21f5598311800e5a9c10d5fae338d9f Mon Sep 17 00:00:00 2001 From: Rodrigo Kumpera Date: Mon, 12 Mar 2012 19:50:48 -0300 Subject: [PATCH] Properly handle ASLR randomization of the main thread stack on darwin. --- include/private/gcconfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 16627ca8..4f7a080e 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -325,7 +325,7 @@ These aren't used when dyld support is enabled (it is by default) */ # define DATASTART ((ptr_t) get_etext()) # define DATAEND ((ptr_t) get_end()) -# define STACKBOTTOM ((ptr_t) 0xc0000000) +# define STACKBOTTOM ((ptr_t) pthread_get_stackaddr_np(pthread_self())) # define USE_MMAP # define USE_MMAP_ANON # define USE_ASM_PUSH_REGS -- 2.40.0