This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug boehm-gc/52179] boehm-gc incompatible with aslr on darwin11


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]