Properly handle ASLR randomization of the main thread stack on darwin.
authorRodrigo Kumpera <kumpera@gmail.com>
Mon, 12 Mar 2012 22:50:48 +0000 (19:50 -0300)
committerRodrigo Kumpera <kumpera@gmail.com>
Mon, 12 Mar 2012 22:51:49 +0000 (19:51 -0300)
libgc/include/private/gcconfig.h

index 16627ca89436c54f78a65c420d234efe9de7406d..4f7a080e999167ccce59e714f8e549f6b55a535a 100644 (file)
         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