Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Dec 2021 08:06:52 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 234775] PTHREAD_STACK_MIN is too small on amd64
Message-ID:  <bug-234775-227-9kxIQZOqw1@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-234775-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-234775-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D234775

--- Comment #5 from Paul Floyd <pjfloyd@wanadoo.fr> ---
Seems to be defined here

paulf> grep -rI __MINSIGSTKSZ * | grep -v obj
include/pthread.h:#define       PTHREAD_STACK_MIN=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20
__MINSIGSTKSZ
sys/arm64/include/_limits.h:#define     __MINSIGSTKSZ   (1024 * 4)
sys/riscv/include/_limits.h:#define     __MINSIGSTKSZ   (1024 * 4)
sys/sys/signal.h:#include <machine/_limits.h>   /* __MINSIGSTKSZ */
sys/sys/signal.h:#define        MINSIGSTKSZ     __MINSIGSTKSZ           /*
minimum stack size */
sys/powerpc/include/_limits.h:#define   __MINSIGSTKSZ   (512 * 4)
sys/x86/include/_limits.h:#define       __MINSIGSTKSZ   (512 * 4)
sys/arm/include/_limits.h:#define       __MINSIGSTKSZ   (1024 * 4)
sys/mips/include/_limits.h:#define __MINSIGSTKSZ     (512 * 4)



Used in quite a lot of places, including sysconf()

So, what to do?

__MINSIGSTKSZ is used for both signal stacks and pthread stacks.

I guess changing=20

sys/x86/include/_limits.h:#define       __MINSIGSTKSZ   (512 * 4)

to

sys/x86/include/_limits.h:#define       __MINSIGSTKSZ   (1024 * 4)

would do the job on i386 and amd64

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-234775-227-9kxIQZOqw1>