[pypy-dev] Increase the default stack limit

Maciej Fijalkowski fijall at gmail.com
Thu Jul 23 13:34:19 CEST 2015


On Thu, Jul 23, 2015 at 11:39 AM, Dima Tisnek <dimaqq at gmail.com> wrote:
> Pardon me if I don't know what I'm talking about:
>
> Can the stack limit not be read from ulimit/getrlimit? Or from failure
> to push stack?

failure is segfault

> That used to work for PHP, at least in the past.
> It also gives users the flexibility between highly recursive
> computation (very high limit) and insane multithreading (low limit to
> conserve memory).
>
> Alternatively, pypi could stick to CPython fixed number of Python
> frames limit, and demand as much system stack as pypi requires to
> implement that.
>
> my 2c.

That's a terrible idea. You can create cases where CPython crashes
with fat frames with the default recursion limit. On the other hand
some JIT code does not consume any stack (so counting frames is
unnecessary computation to start with)


More information about the pypy-dev mailing list