zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: zsh-workers@zsh.org
Subject: Re: zsh eats 100% CPU with completion in /
Date: Mon, 2 Nov 2009 02:26:54 +0100	[thread overview]
Message-ID: <237967ef0911011726q7550593ax30bc61f1a736e725@mail.gmail.com> (raw)
In-Reply-To: <237967ef0911011657n54279c54ja8fce16a1861ff4f@mail.gmail.com>

2009/11/2 Mikael Magnusson <mikachu@gmail.com>:
> 2009/11/1 Peter Stephenson <p.w.stephenson@ntlworld.com>:
>> Mikael Magnusson wrote:
>>> I did the break after typing ./ and before pressing tab.
>>
>> Nothing leapt out of that.  "tokstr" seems to be coming back as "." and
>> then the "." gets removed, as far as I can see, but looking at it out of
>> context I might be wrong.
>>
>> Might be worth checking zlemetacs as well as zlemetaline and zlemetall
>> on entry to get_comp_string() in case they're already wrong, otherwise
>> it's probably down in the bowels of gettok() where it puts together the
>> string it's returning.  I suspect a counting error---one of the myriad
>> substractions to correct for all the things that need fixing on the way
>> through the position calculations is wrong.
>
> Before I actually have to start thinking and looking at the code, does
> this tell you anything? In the working trace, I didn't do the cd ..
> (this is from break zshlex)
> I tried breaking on gettok but it appears my modules don't have debug
> symbols, I might get back in a while if anything interesting shows up there.

Well, I obviously have no idea what I'm doing now, first I just tried
breaking on
gettok, but it went on and on forever, then i started doing s 100 and
it still took
a good while until we came to the infinite loop. Then I tried the new reversible
debugging thing in gdb 7, breaked on zshlex, then continued backward
to gettok, and
stepped forward from there. I'm not exactly sure if I went far enough though.

(gdb) target record
(gdb) break zle_tricky.c:1248
Breakpoint 1 at 0x6faf8088: file zle_tricky.c, line 1248.
(gdb) c
Continuing.

Breakpoint 1, get_comp_string () at zle_tricky.c:1248
1248			for (tt1 = tt; *tt1; tt1++) {
(gdb) print tt1
$1 = 0x0
(gdb) print tt
$2 = 0x6fc05778 "."
(gdb) rs
1247			char *tt1, *e = tt + zlemetacs - wb;
(gdb)
1246	            if (isset(RCQUOTES) && tt) {
(gdb)
dupstring (s=0x6fc05758 ".") at string.c:42
42	}
(gdb)
41	    return t;
(gdb)
40	    strcpy(t, s);
(gdb)
zhalloc (size=8) at mem.c:417
417	}
(gdb)
376		    return ret;
(gdb)
375		    unqueue_signals();
(gdb)
374		    ret = arena(h) + n - size;
(gdb)
373		    h->used = n;
(gdb)
370		if (ARENA_SIZEOF(h) >= (n = size + h->used)) {
(gdb)
368		      ? fheap : heaps);
(gdb)
359	    queue_signals();
(gdb)
357	    size = (size + H_ISIZE - 1) & ~(H_ISIZE - 1);
(gdb)
dupstring (s=0x6fc05758 ".") at string.c:39
39	    t = (char *) zhalloc(strlen((char *)s) + 1);
(gdb)
37	    if (!s)
(gdb)
get_comp_string () at zle_tricky.c:1244
1244		    tt = tokstr ? dupstring(tokstr) : NULL;
(gdb)
1242		if (!zleparse && !tt0) {
(gdb) print tokstr
$3 = 0x6fc05758 "."
(gdb) print tt0
$4 = 0
(gdb) rs
1239		    if (i != redirpos)
(gdb)
ztrdup (s=0x6fc05758 ".") at string.c:55
55	}
(gdb)
54	    return t;
(gdb)
53	    strcpy(t, s);
(gdb)
zalloc (size=2) at mem.c:590
590	}
(gdb)
589	    return ptr;
(gdb)
587	    unqueue_signals();
(gdb)
583	    if (!(ptr = (void *) malloc(size))) {
(gdb)
582	    queue_signals();
(gdb)
580	    if (!size)
(gdb)
ztrdup (s=0x6fc05758 ".") at string.c:52
52	    t = (char *)zalloc(strlen((char *)s) + 1);
(gdb)
50	    if (!s)
(gdb)
get_comp_string () at zle_tricky.c:1237
1237		    cmdstr = ztrdup(tokstr);
(gdb) print cmdstr
$5 = 0x0
(gdb) print tokstr
$6 = 0x6fc05758 "."
(gdb) rs
zsfree (p=0x0) at mem.c:1509
1509	}
(gdb) s
get_comp_string () at zle_tricky.c:1237
1237		    cmdstr = ztrdup(tokstr);
(gdb)
ztrdup (s=0x6fc05758 ".") at string.c:50
50	    if (!s)
(gdb) print cmdstr
$7 = 0x0
(gdb) print tokstr
$8 = 0x6fc05758 "."
(gdb) rs
get_comp_string () at zle_tricky.c:1237
1237		    cmdstr = ztrdup(tokstr);
(gdb)
zsfree (p=0x0) at mem.c:1509
1509	}
(gdb)
1507	    if (p)
(gdb)
get_comp_string () at zle_tricky.c:1236
1236		    zsfree(cmdstr);
(gdb)
1235		    ins = (tok == REPEAT ? 2 : (tok != STRING));
(gdb) print cmdstr
$9 = 0x0
(gdb) rs
1231		if (lincmd && (tok == STRING || tok == FOR || tok == FOREACH ||
(gdb)
1210		if ((ins && (tok == DOLOOP || tok == SEPER)) ||
(gdb)
1208		if (tok == ENDINPUT)
(gdb)
1204		if (tok == DINPAR)
(gdb)
1193		if (inredir && IS_REDIROP(tok)) {
(gdb)
1187		else if (tok == OUTPAR) {
(gdb)
1185		} else if (tok == INPAR)
(gdb)
1181		if (tok == ENVARRAY) {
(gdb)
1179		} else if (tok == ENVSTRING)
(gdb)
1166		if (tok == LEXERR) {
(gdb)
ctxtlex () at lex.c:451
451	}
(gdb)
447	    } else if (inredir) {
(gdb)
443	    if (IS_REDIROP(tok) || tok == FOR || tok == FOREACH || tok == SELECT) {
(gdb)
442		infor = tok == FOR ? 2 : 0;
(gdb)
441	    if (tok != DINPAR)
(gdb)
438		incmdpos = 0;
(gdb) help rs
Step program backward until it reaches the beginning of another source line.
Argument N means do this N times (or till program stops for another reason).
(gdb) help rc
Continue program being debugged but run it in reverse.
If proceeding from breakpoint, a number N may be used as an argument,
which means to set the ignore count of that breakpoint to N - 1 (so that
the breakpoint won't break until the Nth time it is reached).
(gdb) break gettok
Breakpoint 2 at 0x808f3fa: file lex.c, line 673.
(gdb) rc
Continuing.

Breakpoint 2, gettok () at lex.c:673
673	    int peekfd = -1, peek;
(gdb) s
676	    tokstr = NULL;
(gdb)
677	    while (iblank(c = hgetc()) && !lexstop);
(gdb)
ingetc () at input.c:185
185	    if (lexstop)
(gdb)
188		if (inbufleft) {
(gdb)
189		    inbufleft--;
(gdb)
190		    inbufct--;
(gdb)
191		    if (itok(lastc = STOUC(*inbufptr++)))
(gdb) print inbufptr
$10 = 0x6fc05750 "./x "
(gdb) s
193		    if (((inbufflags & INP_LINENO) || !strin) && lastc == '\n')
(gdb) print lastc
$11 = 46
(gdb) s
195		    return lastc;
(gdb)
216	    }
(gdb)
217	}
(gdb)
gettok () at lex.c:678
678	    toklineno = lineno;
(gdb)
679	    if (lexstop)
(gdb)
681	    isfirstln = 0;
(gdb)
682	    wordbeg = inbufct - (qbang && c == bangchar);
(gdb)
683	    hwbegin(-1-(qbang && c == bangchar));
(gdb)
nohw (c=-1) at hist.c:812
812	}
(gdb)
gettok () at lex.c:685
685	    if (dbparens) {
(gdb)
703	    } else if (idigit(c)) {	/* handle 1< foo */
(gdb)
727	    if (c == hashchar && !nocomments &&
(gdb)
750	    switch (lexact1[STOUC(c)]) {
(gdb)
929	    return gettokstr(c, 0);
(gdb) print c
$12 = 46
(gdb) s
gettokstr (c=46, sub=0) at lex.c:949
949	    int bct = 0, pct = 0, brct = 0, fdpar = 0;
(gdb)
950	    int intpos = 1, in_brace_param = 0;
(gdb)
951	    int peek, inquote, unmatched = 0;
(gdb)
956	    peek = STRING;
(gdb)
957	    if (!sub) {
(gdb)
958		len = 0;
(gdb)
959		bptr = tokstr = (char *) hcalloc(bsiz = 32);
(gdb)
hcalloc (size=32) at mem.c:567
567	    ptr = zhalloc(size);
(gdb)
zhalloc (size=32) at mem.c:357
357	    size = (size + H_ISIZE - 1) & ~(H_ISIZE - 1);
(gdb)
359	    queue_signals();
(gdb)
368		      ? fheap : heaps);
(gdb)
370		if (ARENA_SIZEOF(h) >= (n = size + h->used)) {
(gdb)
373		    h->used = n;
(gdb)
374		    ret = arena(h) + n - size;
(gdb)
375		    unqueue_signals();
(gdb)
376		    return ret;
(gdb)
417	}
(gdb)
hcalloc (size=32) at mem.c:568
568	    memset(ptr, 0, size);
(gdb)
569	    return ptr;
(gdb)
570	}
(gdb)
gettokstr (c=46, sub=0) at lex.c:964
964		int inbl = inblank(c);
(gdb)
966		if (fdpar && !inbl && c != ')')
(gdb)
969		if (inbl && !in_brace_param && !pct)
(gdb)
972		    act = lexact2[STOUC(c)];
(gdb)
973		    c = lextok2[STOUC(c)];
(gdb) bt full
#0  gettokstr (c=46, sub=0) at lex.c:973
        act = 18
        e = 1103274760
        inbl = 0
        bct = 0
        pct = 0
        brct = 0
        fdpar = 0
        intpos = 1
        in_brace_param = 0
        peek = 34
        inquote = 0
        unmatched = 0
#1  0x0808fd9e in gettok () at lex.c:929
        c = 46
        d = 5
        peekfd = -1
        peek = 2005139576
#2  0x0808ec98 in zshlex () at lex.c:364
No locals.
#3  0x0808ee5e in ctxtlex () at lex.c:408
        oldpos = 0
#4  0x6faf7b84 in get_comp_string () at zle_tricky.c:1164
        t0 = 1
        tt0 = 0
        i = 0
        j = 0
        k = 0
        cp = 0
        rd = 0
        sl = 2005139972
---Type <return> to continue, or q <return> to quit---
        ocs = 2005139960
        ins = 0
        oins = 0
        ia = 0
        parct = 0
        varq = 0
        ona = 0
        qsub = 0
        zlemetacs_qsub = 0
        redirpos = 0
        s = 0x0
        tmp = 0x821f0a0 "./"
        p = 0x80f8728 ""
        tt = 0x0
        rdop = "\000\000\000\000\004\000\000\000\000P\300o@W\300o\247\360!\b"
        linptr = 0x6fc05748 "./x"
        u = 0x821f0a2 ""
#5  0x6faf6574 in docomplete (lst=4) at zle_tricky.c:659
        s = 0x778404b8 "\350\004\204wV\017\256o9\002\024\b"
        ol = 0x0
        olst = 4
        chl = 0
        ne = 0
        ocs = 2
        ret = 0
        dat = {137335288, 1873838068}
        active = 1
#6  0x6faf5a17 in expandorcomplete (args=0x6fb0bd40) at zle_tricky.c:315
        ret = 2005140840
#7  0x6faf55ba in completecall (args=0x6fb0bd40) at zle_tricky.c:208
No locals.
---Type <return> to continue, or q <return> to quit---
#8  0x6fae5148 in execzlefunc (func=0x6fb09d28, args=0x6fb0bd40, set_bindk=0)
    at zle_main.c:1312
        atcurhist = 1
        wflags = 134
        r = 0
        ret = 0
        remetafy = 0
        w = 0x81499f0
        save_bindk = 0x6fb09d28
#9  0x6fae45b3 in zlecore () at zle_main.c:1050
No locals.
#10 0x6fae4ce5 in zleread (lp=0x80efb44, rp=0x80efacc, flags=7,
context=0) at zle_main.c:1213
        s = 0x0
        old_errno = 3
        tmout = 0
        initthingy = 0x0
#11 0x6fae6e33 in zle_main_entry (cmd=1, ap=0x778406c4 "") at zle_main.c:1866
        lp = 0x80efb44
        rp = 0x80efacc
        flags = 7
        context = 0
#12 0x08086faa in zleentry (cmd=1) at init.c:1304
        ret = 0x0
        ap = 0x778406b4 "D\373\016\b\314\372\016\b\a"
#13 0x0808786d in inputline () at input.c:278
        flags = 7
        ingetcline = 0x0
        ingetcpmptl = 0x80efb44
        ingetcpmptr = 0x80efacc
        context = 0
#14 0x080876dc in ingetc () at input.c:214
---Type <return> to continue, or q <return> to quit---
        lastc = 1102191123
#15 0x0807d865 in ihgetc () at hist.c:263
        c = 3
#16 0x0808f412 in gettok () at lex.c:677
        c = 0
        d = 0
        peekfd = -1
        peek = 0
#17 0x0808ec98 in zshlex () at lex.c:364
No locals.
#18 0x080aa9d8 in parse_event () at parse.c:451
No locals.
#19 0x080844d9 in loop (toplevel=1, justonce=0) at init.c:132
        prog = 0x6fc05ab0
        err = 50
        non_empty = 1
#20 0x08087323 in zsh_main (argc=1, argv=0x77840934) at init.c:1454
        t = 0x77840938
        t0 = 158
#21 0x080553d6 in main (argc=Cannot access memory at address 0x0
) at ./main.c:93
No locals.
(gdb) s
975		switch (act) {
(gdb)
1353		add(c);
(gdb)
add (c=46) at lex.c:535
535	    *bptr++ = c;
(gdb)
536	    if (bsiz == ++len) {
(gdb)
555	}
(gdb)
gettokstr (c=46, sub=0) at lex.c:1354
1354		c = hgetc();
(gdb)
ingetc () at input.c:185
185	    if (lexstop)
(gdb)
188		if (inbufleft) {
(gdb)
189		    inbufleft--;
(gdb)
190		    inbufct--;
(gdb)
191		    if (itok(lastc = STOUC(*inbufptr++)))
(gdb)
193		    if (((inbufflags & INP_LINENO) || !strin) && lastc == '\n')
(gdb)
195		    return lastc;
(gdb)
216	    }
(gdb)
217	}
(gdb)
gettokstr (c=47, sub=0) at lex.c:1355
1355		if (intpos)
(gdb)
1356		    intpos--;
(gdb)
1357		if (lexstop)
(gdb)
964		int inbl = inblank(c);
(gdb)
966		if (fdpar && !inbl && c != ')')
(gdb)
969		if (inbl && !in_brace_param && !pct)
(gdb)
972		    act = lexact2[STOUC(c)];
(gdb)
973		    c = lextok2[STOUC(c)];
(gdb)
975		switch (act) {
(gdb)
1353		add(c);
(gdb)
add (c=0) at lex.c:535
535	    *bptr++ = c;
(gdb)
536	    if (bsiz == ++len) {
(gdb)
555	}
(gdb)
gettokstr (c=0, sub=0) at lex.c:1354
1354		c = hgetc();
(gdb)
ingetc () at input.c:185
185	    if (lexstop)
(gdb)
188		if (inbufleft) {
(gdb)
189		    inbufleft--;
(gdb)
190		    inbufct--;
(gdb)
191		    if (itok(lastc = STOUC(*inbufptr++)))
(gdb) print inbufptr
$13 = 0x6fc05752 "x "
(gdb) s
193		    if (((inbufflags & INP_LINENO) || !strin) && lastc == '\n')
(gdb)
195		    return lastc;
(gdb)
216	    }
(gdb)
217	}
(gdb)
gettokstr (c=120, sub=0) at lex.c:1355
1355		if (intpos)
(gdb)
1357		if (lexstop)
(gdb)
964		int inbl = inblank(c);
(gdb)
966		if (fdpar && !inbl && c != ')')
(gdb)
969		if (inbl && !in_brace_param && !pct)
(gdb)
972		    act = lexact2[STOUC(c)];
(gdb)
973		    c = lextok2[STOUC(c)];
(gdb)
975		switch (act) {
(gdb)
1353		add(c);
(gdb)
add (c=120) at lex.c:535
535	    *bptr++ = c;
(gdb)
536	    if (bsiz == ++len) {
(gdb) print bptr
$14 = 0x6fc0575b ""
(gdb) s
555	}
(gdb)
gettokstr (c=120, sub=0) at lex.c:1354
1354		c = hgetc();
(gdb)
ingetc () at input.c:185
185	    if (lexstop)
(gdb)
188		if (inbufleft) {
(gdb)
189		    inbufleft--;
(gdb)
190		    inbufct--;
(gdb)
191		    if (itok(lastc = STOUC(*inbufptr++)))
(gdb)
193		    if (((inbufflags & INP_LINENO) || !strin) && lastc == '\n')
(gdb) print inbufptr
$15 = 0x6fc05754 ""
(gdb) s
195		    return lastc;
(gdb)
216	    }
(gdb)
217	}
(gdb)
gettokstr (c=32, sub=0) at lex.c:1355
1355		if (intpos)
(gdb)
1357		if (lexstop)
(gdb)
964		int inbl = inblank(c);
(gdb)
966		if (fdpar && !inbl && c != ')')
(gdb)
969		if (inbl && !in_brace_param && !pct)
(gdb)
970		    act = LX2_BREAK;
(gdb)
975		switch (act) {
(gdb)
977		    if (!in_brace_param && !sub)
(gdb)
1361	    hungetc(c);
(gdb)
inungetc (c=32) at input.c:358
358	    if (!lexstop) {
(gdb)
359		if (inbufptr != inbuf) {
(gdb)
368		    inbufptr--;
(gdb)
369		    inbufct++;
(gdb)
370		    inbufleft++;
(gdb)
371		    if (((inbufflags & INP_LINENO) || !strin) && c == '\n')
(gdb)
395		if (inbufptr == inbufpush && inbufflags & INP_ALCONT) {
(gdb)
410	}
(gdb)
gettokstr (c=32, sub=0) at lex.c:1362
1362	    if (unmatched)
(gdb)
1364	    if (in_brace_param) {
(gdb)
1368	    } else if (unset(IGNOREBRACES) && !sub && len > 1 &&
(gdb)
1376	    *bptr = '\0';
(gdb)
1378	    return peek;
(gdb) print peek
$16 = 34
(gdb) s
1379	}
(gdb)
gettok () at lex.c:930
930	}
(gdb)
zshlex () at lex.c:365
365	    while (tok != ENDINPUT && exalias());
(gdb)
exalias () at lex.c:1716
1716	    hwend();
(gdb)
nohwe () at hist.c:817
817	}
(gdb)
exalias () at lex.c:1717
1717	    if (interact && isset(SHINSTDIN) && !strin && !incasepat &&
(gdb)
1722	    if (!tokstr) {
(gdb)
1727		VARARR(char, copy, (strlen(tokstr) + 1));
(gdb)
1729		if (has_token(tokstr)) {
(gdb)
has_token (s=0x6fc05758 ".") at utils.c:1785
1785		if(itok(*s++))
(gdb)
1784	    while(*s)
(gdb)
1787	    return 0;
(gdb)
1788	}
(gdb)
exalias () at lex.c:1736
1736		    zshlextext = tokstr;
(gdb)
1738		if (zleparse && !(inbufflags & INP_ALIAS)) {
(gdb)
1739		    int zp = zleparse;
(gdb)
1741		    gotword();
(gdb)
gotword () at lex.c:1700
1700	    we = zlemetall + 1 - inbufct + (addedx == 2 ? 1 : 0);
(gdb)
1701	    if (zlemetacs <= we) {
(gdb)
1702		wb = zlemetall - wordbeg + addedx;
(gdb)
1703		zleparse = 0;
(gdb)
1705	}
(gdb)
exalias () at lex.c:1742
1742		    if (zp == 1 && !zleparse) {
(gdb)
1743			if (zshlextext == copy)
(gdb)
1745			return 0;
(gdb)
1799	}
(gdb)
zshlex () at lex.c:366
366	    nocorrect &= 1;
(gdb)
367	    if (tok == NEWLIN || tok == ENDINPUT) {
(gdb)
394	    if (tok != NEWLIN)
(gdb)
395		isnewlin = 0;
(gdb)
398	    if (tok == SEMI || tok == NEWLIN)
(gdb)
400	}
(gdb)
ctxtlex () at lex.c:409
409	    switch (tok) {
(gdb)
438		incmdpos = 0;
(gdb)
441	    if (tok != DINPAR)
(gdb)
442		infor = tok == FOR ? 2 : 0;
(gdb)
443	    if (IS_REDIROP(tok) || tok == FOR || tok == FOREACH || tok == SELECT) {
(gdb)
447	    } else if (inredir) {
(gdb)
451	}
(gdb)
get_comp_string () at zle_tricky.c:1166
1166		if (tok == LEXERR) {
(gdb)
1179		} else if (tok == ENVSTRING)
(gdb)
1181		if (tok == ENVARRAY) {
(gdb)
1185		} else if (tok == INPAR)
(gdb)
1187		else if (tok == OUTPAR) {
(gdb)
1193		if (inredir && IS_REDIROP(tok)) {
(gdb)
1204		if (tok == DINPAR)
(gdb)
1208		if (tok == ENDINPUT)
(gdb)
1210		if ((ins && (tok == DOLOOP || tok == SEPER)) ||
(gdb)
1231		if (lincmd && (tok == STRING || tok == FOR || tok == FOREACH ||
(gdb)
1235		    ins = (tok == REPEAT ? 2 : (tok != STRING));
(gdb)
1236		    zsfree(cmdstr);
(gdb)
zsfree (p=0x0) at mem.c:1507
1507	    if (p)
(gdb)
1509	}
(gdb)
get_comp_string () at zle_tricky.c:1237
1237		    cmdstr = ztrdup(tokstr);
(gdb)
ztrdup (s=0x6fc05758 ".") at string.c:50
50	    if (!s)
(gdb)
52	    t = (char *)zalloc(strlen((char *)s) + 1);
(gdb)
zalloc (size=2) at mem.c:580
580	    if (!size)
(gdb)
582	    queue_signals();
(gdb)
583	    if (!(ptr = (void *) malloc(size))) {
(gdb)
587	    unqueue_signals();
(gdb)
589	    return ptr;
(gdb)
590	}
(gdb)
ztrdup (s=0x6fc05758 ".") at string.c:53
53	    strcpy(t, s);
(gdb) bt full
#0  ztrdup (s=0x6fc05758 ".") at string.c:53
        t = 0x818e950 "\270x/\bSEARCH"
#1  0x6faf7fbd in get_comp_string () at zle_tricky.c:1237
        t0 = 1
        tt0 = 0
        i = 0
        j = 0
        k = 0
        cp = 0
        rd = 0
        sl = 2005139972
        ocs = 2005139960
        ins = 0
        oins = 0
        ia = 0
        parct = 0
        varq = 0
        ona = 0
        qsub = 0
        zlemetacs_qsub = 0
        redirpos = 0
        s = 0x0
        tmp = 0x821f0a0 "./"
        p = 0x80f8728 ""
        tt = 0x0
        rdop = "\000\000\000\000\004\000\000\000\000P\300o@W\300o\247\360!\b"
        linptr = 0x6fc05748 "./x"
        u = 0x821f0a2 ""
#2  0x6faf6574 in docomplete (lst=4) at zle_tricky.c:659
        s = 0x778404b8 "\350\004\204wV\017\256o9\002\024\b"
        ol = 0x0
---Type <return> to continue, or q <return> to quit---
        olst = 4
        chl = 0
        ne = 0
        ocs = 2
        ret = 0
        dat = {137335288, 1873838068}
        active = 1
#3  0x6faf5a17 in expandorcomplete (args=0x6fb0bd40) at zle_tricky.c:315
        ret = 2005140840
#4  0x6faf55ba in completecall (args=0x6fb0bd40) at zle_tricky.c:208
No locals.
#5  0x6fae5148 in execzlefunc (func=0x6fb09d28, args=0x6fb0bd40, set_bindk=0)
    at zle_main.c:1312
        atcurhist = 1
        wflags = 134
        r = 0
        ret = 0
        remetafy = 0
        w = 0x81499f0
        save_bindk = 0x6fb09d28
#6  0x6fae45b3 in zlecore () at zle_main.c:1050
No locals.
#7  0x6fae4ce5 in zleread (lp=0x80efb44, rp=0x80efacc, flags=7,
context=0) at zle_main.c:1213
        s = 0x0
        old_errno = 3
        tmout = 0
        initthingy = 0x0
#8  0x6fae6e33 in zle_main_entry (cmd=1, ap=0x778406c4 "") at zle_main.c:1866
        lp = 0x80efb44
        rp = 0x80efacc
        flags = 7
---Type <return> to continue, or q <return> to quit---
        context = 0
#9  0x08086faa in zleentry (cmd=1) at init.c:1304
        ret = 0x0
        ap = 0x778406b4 "D\373\016\b\314\372\016\b\a"
#10 0x0808786d in inputline () at input.c:278
        flags = 7
        ingetcline = 0x0
        ingetcpmptl = 0x80efb44
        ingetcpmptr = 0x80efacc
        context = 0
#11 0x080876dc in ingetc () at input.c:214
        lastc = 1102191123
#12 0x0807d865 in ihgetc () at hist.c:263
        c = 3
#13 0x0808f412 in gettok () at lex.c:677
        c = 0
        d = 0
        peekfd = -1
        peek = 0
#14 0x0808ec98 in zshlex () at lex.c:364
No locals.
#15 0x080aa9d8 in parse_event () at parse.c:451
No locals.
#16 0x080844d9 in loop (toplevel=1, justonce=0) at init.c:132
        prog = 0x6fc05ab0
        err = 50
        non_empty = 1
#17 0x08087323 in zsh_main (argc=1, argv=0x77840934) at init.c:1454
        t = 0x77840938
        t0 = 158
#18 0x080553d6 in main (argc=0, argv=0x0) at ./main.c:93
---Type <return> to continue, or q <return> to quit---
No locals.
(gdb) s
54	    return t;
(gdb)
55	}
(gdb)
get_comp_string () at zle_tricky.c:1239
1239		    if (i != redirpos)
(gdb)
1242		if (!zleparse && !tt0) {
(gdb)
1244		    tt = tokstr ? dupstring(tokstr) : NULL;
(gdb)
dupstring (s=0x6fc05758 ".") at string.c:37
37	    if (!s)
(gdb)
39	    t = (char *) zhalloc(strlen((char *)s) + 1);
(gdb)
zhalloc (size=2) at mem.c:357
357	    size = (size + H_ISIZE - 1) & ~(H_ISIZE - 1);
(gdb)
359	    queue_signals();
(gdb)
368		      ? fheap : heaps);
(gdb)
370		if (ARENA_SIZEOF(h) >= (n = size + h->used)) {
(gdb)
373		    h->used = n;
(gdb)
374		    ret = arena(h) + n - size;
(gdb)
375		    unqueue_signals();
(gdb)
376		    return ret;
(gdb)
417	}
(gdb)
dupstring (s=0x6fc05758 ".") at string.c:40
40	    strcpy(t, s);
(gdb)
41	    return t;
(gdb)
42	}
(gdb)
get_comp_string () at zle_tricky.c:1246
1246	            if (isset(RCQUOTES) && tt) {
(gdb)
1247			char *tt1, *e = tt + zlemetacs - wb;
No more reverse-execution history.

get_comp_string () at zle_tricky.c:1248
1248			for (tt1 = tt; *tt1; tt1++) {
(gdb) print tt
$17 = 0x6fc05778 "."
(gdb) c
Continuing.

Breakpoint 2, gettok () at lex.c:673


At this point I got a bit tired of it though, I might try more tomorrow.

-- 
Mikael Magnusson


  reply	other threads:[~2009-11-02  1:32 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-30 16:10 Frank Terbeck
2009-10-30 21:14 ` Mikael Magnusson
2009-10-30 21:25   ` Mikael Magnusson
2009-10-30 21:33   ` Mikael Magnusson
2009-10-31 20:00     ` Peter Stephenson
2009-10-31 22:43       ` Mikael Magnusson
2009-10-31 23:00         ` Peter Stephenson
2009-11-01  1:50           ` Mikael Magnusson
2009-11-01 18:31             ` Peter Stephenson
2009-11-01 19:33               ` Bart Schaefer
2009-11-01 21:12               ` Mikael Magnusson
2009-11-01 22:20                 ` Peter Stephenson
2009-11-02  0:57                   ` Mikael Magnusson
2009-11-02  1:26                     ` Mikael Magnusson [this message]
2009-11-02 16:38                       ` Peter Stephenson
2009-11-02 20:58                         ` Mikael Magnusson
2009-11-02 21:06                           ` Mikael Magnusson
2009-11-02 21:30                             ` Mikael Magnusson
2009-11-03 10:10                               ` Peter Stephenson
2009-11-03 11:24                                 ` Frank Terbeck
2009-11-02 10:06                     ` Peter Stephenson
2009-10-30 21:29 ` Benjamin R. Haskell
2009-10-30 23:01   ` Frank Terbeck
2009-10-30 23:15     ` Frank Terbeck
  -- strict thread matches above, loose matches on Subject: below --
2009-12-04 21:53 Add completion suffix highlighting Mikael Magnusson
2009-12-04 22:00 ` Mikael Magnusson
2009-12-05 19:31 ` Peter Stephenson
2009-12-05 19:36   ` Peter Stephenson
2009-12-05 19:49   ` Mikael Magnusson
2009-12-05 20:11     ` Peter Stephenson
2008-12-16 15:38 PATCH: edit-command-line with spaces in EDITOR Clint Adams
2008-12-16 17:07 ` Mikael Magnusson
2008-12-16 19:22   ` Peter Stephenson
2008-12-16 19:27   ` Mikael Magnusson
2008-12-16 20:51     ` Richard Hartmann
2008-12-16 21:45   ` Clint Adams
2008-12-16 22:31     ` Mikael Magnusson
2008-12-17 12:16       ` Romain Francoise
     [not found]         ` <237967ef0812170448n11bd34f8y2c98b6484c8c0024@mail.gmail.com>
     [not found]           ` <87oczb9d1j.fsf@elegiac.orebokech.com>
2008-12-17 13:17             ` Mikael Magnusson
2008-12-17 14:44         ` Greg Klanderman
2008-12-17  4:04     ` Bart Schaefer
     [not found] <okiddle@yahoo.co.uk>
2008-10-30 21:20 ` another bug: zsh_directory_name Oliver Kiddle
2008-10-30 21:26   ` Mikael Magnusson
2008-10-30 22:13     ` Peter Stephenson
2008-10-30 23:44       ` Vincent Lefevre
2008-10-31  0:14       ` Mikael Magnusson
2008-10-31  9:44       ` Oliver Kiddle
2008-10-31  9:58         ` Peter Stephenson
2008-10-30 22:16   ` Peter Stephenson
2008-10-31 11:10 ` PATCH: bug with hash builtin Oliver Kiddle
2008-10-31 21:07   ` Peter Stephenson
2008-05-04  0:52 Identify "active" region? Bart Schaefer
2008-05-04  7:16 ` Mikael Magnusson
2008-05-04 12:21 ` Peter Stephenson
2008-05-04 12:33   ` Mikael Magnusson
2008-05-04 12:35     ` Mikael Magnusson
2008-05-04 13:28       ` Mikael Magnusson
2008-05-04 18:05         ` Peter Stephenson
2008-05-04 19:10           ` Mikael Magnusson
2008-05-04 16:38       ` Bart Schaefer
2008-05-04 17:52         ` Mikael Magnusson
2008-04-13 16:54 PATCH: (large) initial support for combining characters in ZLE Peter Stephenson
2008-04-13 17:32 ` Bart Schaefer
2008-04-14  9:02   ` Peter Stephenson
2008-04-14 12:00 ` Peter Stephenson
2008-04-14 13:34 ` Mikael Magnusson
2008-04-14 13:54   ` Peter Stephenson
2008-04-15 13:58     ` Mikael Magnusson
2008-04-15 16:46       ` Peter Stephenson
2008-04-16  1:28         ` Mikael Magnusson
2008-04-16  8:47           ` Peter Stephenson
2008-04-17  9:28             ` Stephane Chazelas
2008-09-22 18:16             ` Mikael Magnusson
2008-09-22 18:36               ` Peter Stephenson
2008-09-22 18:39                 ` Mikael Magnusson
2008-04-17 18:33 ` Jun T.
2008-04-18  9:40   ` Peter Stephenson
2008-04-18 15:48     ` Jun T.
2008-04-18 16:05       ` Peter Stephenson
2008-04-19 15:04         ` Jun T.
     [not found] <mikachu@gmail.com>
2008-02-06 15:02 ` Completion lockup Mikael Magnusson
2008-02-06 15:07   ` Ismail Dönmez
2008-02-09 17:21   ` Peter Stephenson
2008-02-09 18:04     ` Mikael Magnusson
2008-02-09 19:13       ` Peter Stephenson
2008-08-30 12:02 ` Who is sorting my completion results? Mikael Magnusson
2008-08-30 12:16   ` Peter Stephenson
2008-08-30 12:39     ` Mikael Magnusson
     [not found] ` <237967ef0902140622s7389d2c8h5a0c786dcf207422@mail.gmail.com>
     [not found]   ` <200902141801.n1EI1E2l003603@pws-pc.ntlworld.com>
     [not found]     ` <237967ef0902141019t30118690m30116c9413015d96@mail.gmail.com>
     [not found]       ` <090214111316.ZM15188@torch.brasslantern.com>
     [not found]         ` <237967ef0902141141y609b61d3i154546f6f6886c65@mail.gmail.com>
     [not found]           ` <090214133904.ZM15383@torch.brasslantern.com>
     [not found]             ` <20090216094632.30502fe9@news01>
2009-02-16  9:55               ` Problem with fake-files style and cd Mikael Magnusson
2011-05-27  1:25                 ` Mikael Magnusson
2011-05-27  4:41                   ` Bart Schaefer
2011-05-27  4:57                     ` Mikael Magnusson
2011-05-27  5:36                       ` Bart Schaefer
2011-05-27 14:24                         ` Mikael Magnusson
2011-05-27 14:39                           ` Peter Stephenson
2011-05-27 15:06                           ` Bart Schaefer
2011-05-27 15:16                             ` Mikael Magnusson
2011-05-27 15:44                               ` Bart Schaefer
2011-01-06 19:22 ` Infinite loop, can't reproduce with zsh -f Mikael Magnusson
2011-01-06 20:03   ` Peter Stephenson
2014-11-23 21:07 ` PATCH: Fix leaks of desthost in ztcp Mikael Magnusson
2014-11-23 21:53   ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=237967ef0911011726q7550593ax30bc61f1a736e725@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=p.w.stephenson@ntlworld.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).