From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1873) id D2B0B3857C66; Fri, 19 Nov 2021 13:58:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2B0B3857C66 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Iain Buclaw To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-9252] libphobos: Increase size of defaultStackPages on OSX X86_64 targets. X-Act-Checkin: gcc X-Git-Author: Iain Buclaw X-Git-Refname: refs/heads/releases/gcc-11 X-Git-Oldrev: 12938501b8a603acdb56a2f7dd6688422d1633f3 X-Git-Newrev: dc3630e05d7df3d9a93400e33710dd19be207da3 Message-Id: <20211119135837.D2B0B3857C66@sourceware.org> Date: Fri, 19 Nov 2021 13:58:37 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2021 13:58:37 -0000 https://gcc.gnu.org/g:dc3630e05d7df3d9a93400e33710dd19be207da3 commit r11-9252-gdc3630e05d7df3d9a93400e33710dd19be207da3 Author: Iain Buclaw 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. (cherry picked from commit f316727e5f6a4c58b63bdee9ad6be785f97f5ee7) 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;