Disable stack gap for ntpd during build.

When starting, ntpd calls setrlimit(2) to limit maximum size of its
stack. The stack limit chosen by ntpd is 200K, so when stack gap
is enabled, the stack gap is larger than this limit, which results
in ntpd crashing.

Submitted by: Dawid Gorecki <dgr@semihalf.com>
Reviewed by: cy, imp
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D29553
This commit is contained in:
Marcin Wojtas 2021-05-21 11:29:22 +02:00
parent c6081dea59
commit af949c590b

View File

@ -56,4 +56,7 @@ CLEANFILES+= .version version.c
version.c:
sh -e ${.CURDIR:H}/scripts/mkver ntpd
afterbuild:
${ELFCTL} -e +noaslrstkgap ${PROG}
.include <bsd.prog.mk>