fix boehm-gc for recent alpha-linux
Richard Henderson
rth@twiddle.net
Tue Apr 12 18:53:00 GMT 2005
Sometime in relatively recent history, the 2.6 linux kernel began
randomizing the stack start address for all architectures. This
causes the hard-coded stack start address that we were using in
boehm-gc to be incorrect, which means that *any* garbage collect
would segfault and die. Which resulted in the horrible java test
results seen in
http://gcc.gnu.org/ml/gcc-testresults/2005-03/msg01991.html
Fortunately, fixing this is as easy as using other existing linux
code already in the collector. I've applied this patch to mainline,
and the 3.3 and 3.4 branches.
Mark, I'd like to apply this to 4.0 as well. It will affect no
other targets. Test results for 4.0 are here
http://gcc.gnu.org/ml/gcc-testresults/2005-04/msg00869.html
r~
* include/private/gcconfig.h (alpha-linux): Use LINUX_STACKBOTTOM.
Index: boehm-gc/include/private/gcconfig.h
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/include/private/gcconfig.h,v
retrieving revision 1.39
diff -u -p -d -r1.39 gcconfig.h
--- boehm-gc/include/private/gcconfig.h 13 Oct 2004 10:34:21 -0000 1.39
+++ boehm-gc/include/private/gcconfig.h 12 Apr 2005 18:44:07 -0000
@@ -1544,7 +1544,7 @@
# endif
# ifdef LINUX
# define OS_TYPE "LINUX"
-# define STACKBOTTOM ((ptr_t) 0x120000000)
+# define LINUX_STACKBOTTOM
# ifdef __ELF__
# define SEARCH_FOR_DATA_START
# define DYNAMIC_LOADING
More information about the Gcc-patches
mailing list