On Wednesday, 25 October 2017 at 13:26:26 UTC, Steven
Schveighoffer wrote:
On 10/23/17 12:56 PM, Brian Schott wrote:
Context: https://issues.dlang.org/show_bug.cgi?id=17914
I need to get this issue resolved as soon as possible so that
the fix makes it into the next compiler release. Because it
involves cleanup code in a class destructor a design change
may be necessary. Who should I contact to determine the best
way to fix this bug?
It appears that the limitation applies to mmap calls as well,
and mmap call to allocate the stack has been in Fiber since as
far as I can tell the beginning. How has this not shown up
before?
Although after the stack overflow protection for fibers number of
mmap calls is the same, _I think_ mprotect actually splits the
single mmapped region into two (as they share different
protection bits). This effectively doubles the number of the
regions. As a workaround (if you have lots of fibers and doesn't
care about stack overflow protection) you can just pass zero for
the guardPageSize:
https://github.com/dlang/druntime/blob/master/src/core/thread.d#L4037