]> granicus.if.org Git - gc/commitdiff
Fix STACKBOTTOM for Solaris 11/x86
authorPeter Wang <novalazy@gmail.com>
Thu, 16 Jun 2016 09:16:05 +0000 (12:16 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 16 Jun 2016 09:16:05 +0000 (12:16 +0300)
* 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.

include/private/gcconfig.h

index f4935b4f258f4ad6b4b1ff61e3e91bab2e2414ff..21dba21b5ce0ccae34b7f826be95a711b54445ba 100644 (file)
 /*      base is a property of the executable, so this should not break  */
 /*      old executables.                                                */
 /*      HEURISTIC2 probably works, but this appears to be preferable.   */
-#       include <sys/vm.h>
-#       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 <sys/vmparam.h>
+#       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