Browse files

Properly handle ASLR randomization of the main thread stack on darwin.

  • Loading branch information...
1 parent 3fbfc67 commit 35342843594e0c812885521acad42e3a0c165316 @kumpera kumpera committed with duncanmak Mar 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 libgc/include/private/gcconfig.h
View
2 libgc/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

0 comments on commit 3534284

Please sign in to comment.