https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107491
Bug ID: 107491 Summary: GccGo stack not resizing on Solaris Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: jakub.kulik at oracle dot com Target Milestone: --- Created attachment 53809 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53809&action=edit simple program with recursion that break on Solaris Question regarding gccgo and stack sizes on Solaris (and other non GNU/Linux systems). When I run a code with (not that deep) recursion (example attached) on Solaris, it segfaults as it overflows the stack. I checked with gdb on both Linux and Solaris and Linux is calling `__morestack` once in a while and Solaris does not. IIUIC, __morestack allocates additional stack when compiled with `-fsplit-stack`, which is "currently only supported on GNU/Linux". As for my question, is this behavior (segfault after 4MB stack is exhausted) expected or is there a different stack resize/overflow prevention on non `-split-stack` platforms that might not be working correctly on Solaris? This is on Oracle Solaris 11.4 and gccgo shipped with gcc 10.4, 11.3 and 12.1. (Golang is fine but that is to be expected as they implement all this in a different way).