diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-11-19 14:43:07 +0100 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-11-19 14:43:07 +0100 |
commit | f316727e5f6a4c58b63bdee9ad6be785f97f5ee7 (patch) | |
tree | c2095f3569056e4814f59956b9d84cd94a39390e /libphobos | |
parent | d686cb0d740b0278fdbd7915f43faff14b203888 (diff) | |
download | gcc-f316727e5f6a4c58b63bdee9ad6be785f97f5ee7.zip gcc-f316727e5f6a4c58b63bdee9ad6be785f97f5ee7.tar.gz gcc-f316727e5f6a4c58b63bdee9ad6be785f97f5ee7.tar.bz2 |
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.
Diffstat (limited to 'libphobos')
-rw-r--r-- | libphobos/libdruntime/core/thread/fiber.d | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libphobos/libdruntime/core/thread/fiber.d b/libphobos/libdruntime/core/thread/fiber.d index f4c04ce..2f90f17 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; |