This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug boehm-gc/52179] boehm-gc incompatible with aslr on darwin11
- From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 23 Feb 2012 15:49:06 +0000
- Subject: [Bug boehm-gc/52179] boehm-gc incompatible with aslr on darwin11
- Auto-submitted: auto-generated
- References: <bug-52179-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52179
--- Comment #15 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-02-23 15:49:06 UTC ---
I notice in boehm-gc/include/private/gcconfig.h we are already setting...
# ifdef DARWIN
# define OS_TYPE "DARWIN"
# define DYNAMIC_LOADING
# if defined(__ppc64__)
# define ALIGNMENT 8
# define CPP_WORDSZ 64
# define STACKBOTTOM ((ptr_t) 0x7fff5fc00000)
# define CACHE_LINE_SIZE 64
# ifndef HBLKSIZE
# define HBLKSIZE 4096
# endif
# else
# define ALIGNMENT 4
# define STACKBOTTOM ((ptr_t) 0xc0000000)
# endif
so I guess we just want to append
#ifdef HAVE_PTHREAD_GET_STACKADDR_NP
#define STACKBOTTOM (ptr_t)pthread_get_stackaddr_np(pthread_self())
#endif
at the end of those lines