pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk/platform



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Mon Apr  7 12:12:46 UTC 2025

Modified Files:
        pkgsrc/mk/platform: SunOS.mk

Log Message:
mk: Limit the unlimited stacksize on SunOS.

The default hard limit of stacksize on SunOS is "unlimited".  If this is set
as the soft limit then stack_getbounds(3C) returns the top of the stack as
the address with a size of zero.  This can confuse stack guard allocators
such as the one used by lang/rust which then try to allocate a guard page.

Instead set an arbitrary limit of 128MB which should be more than enough,
and fixes the build of lang/rust.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 pkgsrc/mk/platform/SunOS.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/platform/SunOS.mk
diff -u pkgsrc/mk/platform/SunOS.mk:1.94 pkgsrc/mk/platform/SunOS.mk:1.95
--- pkgsrc/mk/platform/SunOS.mk:1.94    Tue Feb 18 11:58:53 2025
+++ pkgsrc/mk/platform/SunOS.mk Mon Apr  7 12:12:46 2025
@@ -1,4 +1,4 @@
-# $NetBSD: SunOS.mk,v 1.94 2025/02/18 11:58:53 wiz Exp $
+# $NetBSD: SunOS.mk,v 1.95 2025/04/07 12:12:46 jperkin Exp $
 #
 # Variable definitions for the SunOS/Solaris operating system.
 
@@ -23,11 +23,15 @@ ROOT_GROUP?=                root
 ROOT_USER?=            root
 SERIAL_DEVICES?=       /dev/null
 ULIMIT_CMD_datasize?=  ulimit -d `${SETENV} LC_MESSAGES=C ulimit -H -d`
-ULIMIT_CMD_stacksize?= ulimit -s `${SETENV} LC_MESSAGES=C ulimit -H -s`
 ULIMIT_CMD_cputime?=   ulimit -t `${SETENV} LC_MESSAGES=C ulimit -H -t`
 ULIMIT_CMD_memorysize?=        ulimit -v `${SETENV} LC_MESSAGES=C ulimit -H -v`
 USERADD?=              /usr/sbin/useradd
 
+# stack_getbounds(3C) with a stacksize of "unlimited" will return the top of
+# stack as the address and a size of zero.  This can confuse stack guards such
+# as the one used by lang/rust, so instead just set it to a very large value.
+ULIMIT_CMD_stacksize?= ulimit -s 131072
+
 .if ${OS_VARIANT:U} == "OmniOS"
 # The native tar(1) is a pre-POSIX one which truncates paths longer than
 # 100 bytes.



Home | Main Index | Thread Index | Old Index