Index: usr.sbin/ntp/config.h =================================================================== --- usr.sbin/ntp/config.h +++ usr.sbin/ntp/config.h @@ -290,7 +290,7 @@ #define DFLT_RLIMIT_MEMLOCK -1 /* Default number of 4k pages for RLIMIT_STACK */ -#define DFLT_RLIMIT_STACK 50 +#define DFLT_RLIMIT_STACK 4096 /* Directory separator character, usually / or \\ */ #define DIR_SEP '/' Index: usr.sbin/ntp/ntpd/ntp.conf =================================================================== --- usr.sbin/ntp/ntpd/ntp.conf +++ usr.sbin/ntp/ntpd/ntp.conf @@ -110,3 +110,7 @@ # 0 may result in a segfault when ASLR with stack gap randomization # is enabled. #rlimit memlock 32 + +# Specify the stack size limit in 4k pages. Low stack size limit often +# results in segfault when ASLR stack gap is enabled. +#rlimit stacksize 50