Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Infinite loop, can't reproduce with zsh -f



Hi, I was going to test something in relation to the =~ bug in the
other thread and forgot what -regex-match was called, so i tried
set -x; [[ a =~ b ]]; set +x
but it just starts spinning forever. It doesn't in zsh -f though.

Any ideas what to look for here? Note that running set -x and +x on
separate lines before and after works fine... In fact, having set -x
on the same line works too, the problematic case is
[[ a =~ b ]]; set +x
for some reason.

^C
Program received signal SIGINT, Interrupt.
gettext2 (state=0x7fffffffd640) at text.c:350
350			if (!(stack = (WC_SUBLIST_TYPE(code) == WC_SUBLIST_END))) {
(gdb) bt
#0  gettext2 (state=0x7fffffffd640) at text.c:350
#1  0x0000000000489bca in getjobtext (prog=0x7ffff7fefc00,
c=0x7ffff7fefc38) at text.c:223
#2  0x00000000004427e8 in loop (toplevel=1, justonce=0) at init.c:174
#3  0x0000000000445771 in zsh_main (argc=1, argv=0x7fffffffd828) at init.c:1508
#4  0x0000000000410674 in main (argc=1, argv=0x7fffffffd828) at ./main.c:93
(gdb) n
361		    if (stack < 1 && (WC_SUBLIST_FLAGS(s->code) & WC_SUBLIST_SIMPLE))
(gdb) [i'll leave out the following empty (gdb) lines]
363		    break;
845	    }
302		if (stack) {
303		    if (!(s = tstack))
305		    if (s->pop) {
310		    code = s->code;
311		    stack = 0;
316		switch (wc_code(code)) {
340		    if (!s) {
350			if (!(stack = (WC_SUBLIST_TYPE(code) == WC_SUBLIST_END))) {
361		    if (stack < 1 && (WC_SUBLIST_FLAGS(s->code) & WC_SUBLIST_SIMPLE))
363		    break;
(gdb) print *s
$7 = {prev = 0x0, code = 4098, pop = 0, u = {_redir = {list =
0xf000d000c000b}, _funcdef = {
      strs = 0xf000d000c000b <Address 0xf000d000c000b out of bounds>,
      end = 0x14001200110010}, _case = {end = 0xf000d000c000b}, _if =
{cond = 786443,
      end = 0x14001200110010}, _cond = {par = 786443}, _subsh = {end =
0xf000d000c000b}}}

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author