From: Peter Wang Date: Thu, 16 Jun 2016 09:16:05 +0000 (+0300) Subject: Fix STACKBOTTOM for Solaris 11/x86 X-Git-Tag: v7.4.6~273 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0106c5e573e0b1b690001d090e0190a58a13010b;p=gc Fix STACKBOTTOM for Solaris 11/x86 (Apply commit 81cae56 from 'master' branch.) * include/private/gcconfig.h [I386 && SOLARIS] (STACKBOTTOM, HEURISTIC2): Define conditionally depening on USERLIMIT - use HEURISTIC2 if USERLIMIT is undefined (workaround similar to that for Solaris/sparc and Solaris/x64); include sys/vmparam.h instead of sys/vm.h; update comment. --- diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 3f682f47..b4fddc94 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -1201,8 +1201,16 @@ /* base is a property of the executable, so this should not break */ /* old executables. */ /* HEURISTIC2 probably works, but this appears to be preferable. */ -# include -# define STACKBOTTOM ((ptr_t) USRSTACK) +/* Apparently USRSTACK is defined to be USERLIMIT, but in some */ +/* installations that's undefined. We work around this with a */ +/* gross hack: */ +# include +# ifdef USERLIMIT + /* This should work everywhere, but doesn't. */ +# define STACKBOTTOM ((ptr_t)USRSTACK) +# else +# define HEURISTIC2 +# endif /* At least in Solaris 2.5, PROC_VDB gives wrong values for dirty bits. */ /* It appears to be fixed in 2.8 and 2.9. */ # ifdef SOLARIS25_PROC_VDB_BUG_FIXED