[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24358: 25.1.50; re-search-forward errors with "Variable binding dept

From: Eli Zaretskii
Subject: bug#24358: 25.1.50; re-search-forward errors with "Variable binding depth exceeds max-specpdl-size"
Date: Sun, 23 Oct 2016 23:18:03 +0300

Noam, there's something I don't understand here: why is regex.c using
malloc for allocating the failure stack?  AFAICS, REGEX_MALLOC is not
defined, so the only way I can explain this to myself is that we use
SAFE_ALLOCA, and that falls back to malloc because the failure stack
needs more than 16KB of memory.  Is that correct?

If so, then one other way of solving the original problem that doesn't
open the gates of the ralloc.c hell is to allow a larger amount of
stack allocations in regex.c before we fall back to malloc.  Since the
maximum size of the failure stack is limited by something like 800KB,
and the C stack limit is set in main.c to allow the failure stack be
allocated off the stack, why don't we make use of this fact?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]