[Issue 21919] darwin: SEGV in core.thread tests on OSX 11
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 7 18:44:18 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21919
--- Comment #9 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Done some prodding around, and the root cause is darwin's libunwind now
overflows the Fiber's small 16kb stack.
Fix then is to bump the stack allocated for Fibers.
version (Windows)
// exception handling walks the stack, invoking DbgHelp.dll which
// needs up to 16k of stack space depending on the version of
DbgHelp.dll,
// 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)
+ enum defaultStackPages = 8;
+ else
+ enum defaultStackPages = 4;
+ }
else
enum defaultStackPages = 4;
Darwin x86 pagesize is 4k, whilst arm64 is 16k, so this fix should only be
applied to 64-bit code.
--
More information about the Digitalmars-d-bugs
mailing list