r278882 - If possible, set the stack rlimit to at least 8MiB on cc1 startup, and work

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 18 11:33:49 PDT 2016


On Wed, Aug 17, 2016 at 6:35 AM, Joerg Sonnenberger via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> On Wed, Aug 17, 2016 at 01:05:08AM -0000, Richard Smith via cfe-commits
> wrote:
> > Author: rsmith
> > Date: Tue Aug 16 20:05:07 2016
> > New Revision: 278882
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=278882&view=rev
> > Log:
> > If possible, set the stack rlimit to at least 8MiB on cc1 startup, and
> work
> > around a Linux kernel bug where the actual amount of available stack may
> be a
> > *lot* lower than the rlimit.
>
> Can you please restrict this to Linux? I'm quite opposed to overriding
> system default limits, they exist for a reason.


No, that wouldn't make any sense. It's not up to the operating system how
an application decides to allocate memory (on the heap versus on the
stack), and Clang's stack usage isn't going to be significantly lower on
other kernels. If some BSD kernel's VM is unable to cope with this, we
could spawn a thread with a suitable amount of stack space instead.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160818/72cb2ea0/attachment.html>


More information about the cfe-commits mailing list