bug-gnu-emacs
[Top][All Lists]
Advanced

[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: npostavs
Subject: bug#24358: 25.1.50; re-search-forward errors with "Variable binding depth exceeds max-specpdl-size"
Date: Sat, 08 Oct 2016 14:52:26 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>
> Do you see buffer text actually changing its address in this scenario?
> Otherwise, we might be chasing a wild goose.

Yes, now that I know what to look for, it's easy enough.  I added just
this to .gdbinit:

    break search_command if (bound == 0)
    commands
      watch current_buffer->text->beg
      continue
    end
    # break only on the 2nd call to search_command
    ignore 3 1

And here is the result:

    Thread 1 "emacs" hit Breakpoint 3, search_command (string=25301860, 
bound=0, noerror=44544, count=0, 
        direction=1, RE=1, posix=false) at search.c:1024
    1024          EMACS_INT n = direction;
    Hardware watchpoint 4: current_buffer->text->beg

    Thread 1 "emacs" hit Hardware watchpoint 4: current_buffer->text->beg

    Old value = (unsigned char *) 0x18351b8 ""
    New value = (unsigned char *) 0x188a1b8 ""
    r_alloc_sbrk (size=290816) at ralloc.c:818
    818           for (b = last_bloc; b != NIL_BLOC; b = b->prev)
    (gdb) bt 12
    #0  r_alloc_sbrk (size=290816) at ralloc.c:818
    #1  0x00000000006ced96 in get_contiguous_space (size=290816, 
position=0x1833000) at gmalloc.c:476
    #2  0x00000000006cf92a in _malloc_internal_nolock (size=163840) at 
gmalloc.c:844
    #3  0x00000000006cfe9d in _malloc_internal (size=163840) at gmalloc.c:927
    #4  0x00000000006cff1a in gmalloc (size=163840) at gmalloc.c:951
    #5  0x00000000006d14e4 in malloc (size=163840) at gmalloc.c:1827
    #6  0x00000000005f3e6b in lmalloc (size=163840) at alloc.c:1414
    #7  0x00000000005f3356 in xmalloc (size=163840) at alloc.c:821
    #8  0x00000000005f38e4 in record_xmalloc (size=163840) at alloc.c:1038
    #9  0x00000000005ee233 in re_match_2_internal (bufp=0xd6d650 
<searchbufs+5072>, 
        string1=0x1835988 "DESCRIPTION;LANGUAGE=en-US:Nn 
Nnnnn\\,\\n\\nNnnnnnnnn nnn nnn nnnnnn nn nnnnnn\n nnnnnnn nnnn nnnnnnnnn. N 
nnnn nnnnnnnnn nn nnn nnnnnnnn nnnnnnn nnn nn nn\n nn nn-nnnnnnn nn Nnnnnnn nn 
99.99 NNNN\\n\\nNnnn "..., size1=0, 
        string2=0x1835988 "DESCRIPTION;LANGUAGE=en-US:Nn 
Nnnnn\\,\\n\\nNnnnnnnnn nnn nnn nnnnnn nn nnnnnn\n nnnnnnn nnnn nnnnnnnnn. N 
nnnn nnnnnnnnn nn nnn nnnnnnnn nnnnnnn nnn nn nn\n nn nn-nnnnnnn nn Nnnnnnn nn 
99.99 NNNN\\n\\nNnnn "..., size2=40918, pos=0, regs=0xd6deb0 <search_regs>, 
stop=40918)
        at regex.c:5844
    #10 0x00000000005e9022 in re_search_2 (bufp=0xd6d650 <searchbufs+5072>, 
        str1=0x1835988 "DESCRIPTION;LANGUAGE=en-US:Nn Nnnnn\\,\\n\\nNnnnnnnnn 
nnn nnn nnnnnn nn nnnnnn\n nnnnnnn nnnn nnnnnnnnn. N nnnn nnnnnnnnn nn nnn 
nnnnnnnn nnnnnnn nnn nn nn\n nn nn-nnnnnnn nn Nnnnnnn nn 99.99 NNNN\\n\\nNnnn 
"..., size1=0, 
        str2=0x1835988 "DESCRIPTION;LANGUAGE=en-US:Nn Nnnnn\\,\\n\\nNnnnnnnnn 
nnn nnn nnnnnn nn nnnnnn\n nnnnnnn nnnn nnnnnnnnn. N nnnn nnnnnnnnn nn nnn 
nnnnnnnn nnnnnnn nnn nn nn\n nn nn-nnnnnnn nn Nnnnnnn nn 99.99 NNNN\\n\\nNnnn 
"..., size2=40918, startpos=0, range=40918, regs=0xd6deb0 <search_regs>, 
        stop=40918) at regex.c:4470
    #11 0x00000000005d6c06 in search_buffer (string=25301860, pos=1, 
pos_byte=1, lim=40891, 
        lim_byte=40919, n=1, RE=1, trt=20893029, inverse_trt=20483397, 
posix=false) at search.c:1265
    (More stack frames follow...)

    Lisp Backtrace:
    "re-search-forward" (0xffffc2e0)
    "progn" (0xffffc460)
    "unwind-protect" (0xffffc5a0)
    "save-current-buffer" (0xffffc710)
    "let" (0xffffc910)
    "eval-buffer" (0xffffcbf0)
    "load-with-code-conversion" (0xffffd158)
    "load" (0xffffd4e8)
    "command-line-1" (0xffffda30)
    "command-line" (0xffffdfe8)
    "normal-top-level" (0xffffe490)





reply via email to

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