public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5402] libphobos: Increase size of defaultStackPages on OSX X86_64 targets.
@ 2021-11-19 13:49 Iain Buclaw
0 siblings, 0 replies; only message in thread
From: Iain Buclaw @ 2021-11-19 13:49 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:f316727e5f6a4c58b63bdee9ad6be785f97f5ee7
commit r12-5402-gf316727e5f6a4c58b63bdee9ad6be785f97f5ee7
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date: Fri Nov 19 14:43:07 2021 +0100
libphobos: Increase size of defaultStackPages on OSX X86_64 targets.
As of macOS 11, libunwind now requires more stack space than 16k, so
default to a larger stack size. This is only applied to X86 as the
PAGESIZE is still 4k, however on AArch64 it is 16k.
libphobos/ChangeLog:
* libdruntime/core/thread/fiber.d (defaultStackPages): Increase size
on OSX X86_64 targets.
Diff:
---
libphobos/libdruntime/core/thread/fiber.d | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libphobos/libdruntime/core/thread/fiber.d b/libphobos/libdruntime/core/thread/fiber.d
index f4c04ce7358..2f90f179edb 100644
--- a/libphobos/libdruntime/core/thread/fiber.d
+++ b/libphobos/libdruntime/core/thread/fiber.d
@@ -595,6 +595,16 @@ class Fiber
// the existence of debug symbols and other conditions. Avoid causing
// stack overflows by defaulting to a larger stack size
enum defaultStackPages = 8;
+ else version (OSX)
+ {
+ version (X86_64)
+ // libunwind on macOS 11 now requires more stack space than 16k, so
+ // default to a larger stack size. This is only applied to X86 as
+ // the PAGESIZE is still 4k, however on AArch64 it is 16k.
+ enum defaultStackPages = 8;
+ else
+ enum defaultStackPages = 4;
+ }
else
enum defaultStackPages = 4;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-19 13:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 13:49 [gcc r12-5402] libphobos: Increase size of defaultStackPages on OSX X86_64 targets Iain Buclaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).