Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 17f51ab

Browse files
ibuclawdlang-bot
authored andcommitted
fix Issue 21919 - darwin: SEGV in core.thread tests on OSX 11
1 parent b4e6f7c commit 17f51ab

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/core/thread/fiber.d

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,16 @@ class Fiber
545545
// the existence of debug symbols and other conditions. Avoid causing
546546
// stack overflows by defaulting to a larger stack size
547547
enum defaultStackPages = 8;
548+
else version (OSX)
549+
{
550+
version (X86_64)
551+
// libunwind on macOS 11 now requires more stack space than 16k, so
552+
// default to a larger stack size. This is only applied to X86 as
553+
// the PAGESIZE is still 4k, however on AArch64 it is 16k.
554+
enum defaultStackPages = 8;
555+
else
556+
enum defaultStackPages = 4;
557+
}
548558
else
549559
enum defaultStackPages = 4;
550560

0 commit comments

Comments
 (0)