[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 22:18:25 +0300

> From: Noam Postavsky <address@hidden>
> Date: Sun, 23 Oct 2016 14:14:59 -0400
> Cc: Sam Halliday <address@hidden>, address@hidden
> On Sun, Oct 23, 2016 at 2:06 PM, Eli Zaretskii <address@hidden> wrote:
> > Noam, I think we need these two changes, because otherwise looping
> > more than once in search_buffer will fail to update the pointers
> > passed to re_search_2, if buffer text was relocated inside
> > re_search_2.
> >
> > Do you agree?
> Ack, yes! Missing the update to base was a total thinko on my part.


There might be a more serious problem with this, unfortunately: the
search registers are computed in regex.c using pointers into the C
strings that are being searched.  The general paradigm is as in this

  regstart[*p] = d;
  regs->start[reg] = POINTER_TO_OFFSET (regstart[reg]);

POINTER_TO_OFFSET assumes that the pointer in regstart[reg] is
consistent with the current base address of the string into which it
points.  Did you study this aspect of regex.c when you decided which
values need to be affected by relocation?

reply via email to

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