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

Re: zsh eats 100% CPU with completion in /



2009/11/1 Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>:
> Mikael Magnusson wrote:
>> (gdb) print clwpos
>> $8 = 0
>> (gdb) print clwords
>> $9 = (char **) 0x8144278
>> (gdb) print clwords[0]
>> $10 = 0x82fb758 ""
>
> Thanks---I think that means somehow it's got confused in the lexical
> analyser, there's not much scope for more problems in get_comp_string().
> That first word obviously ought to be "./x".  Possibly something hasn't
> been reset properly after the last operation; we've seen a couple of
> things like that.  We need to find out why the first
> zshlex(), and hence gettok(), is setting tok to STRING but not tokstr to
> "./x" (if it is, the problem is in get_comp_string() after all).  It
> might well be something quite simple.

I didn't spend too much thinking about when to print variable values
here, but if you point to somewhere I can do a bt full there.

I did the break after typing ./ and before pressing tab.

(gdb) break zshlex
Breakpoint 1 at 0x8091bf6
(gdb) break get_comp_string
Breakpoint 2 at 0x6fa7b420: file zle_tricky.c, line 1067.
(gdb) c
Continuing.

Breakpoint 1, 0x08091bf6 in zshlex ()
(gdb) bt full
#0  0x08091bf6 in zshlex ()
No symbol table info available.
#1  0x080927ab in ctxtlex ()
No symbol table info available.
#2  0x6fa808a4 in doexpandhist () at zle_tricky.c:2662
        ol = 0x6fb89740 "./"
        oll = 2
        ocs = 2
        ne = 0
        err = 1873283000
        ona = 0
#3  0x6fa7a144 in docomplete (lst=4) at zle_tricky.c:624
        s = 0x41b6cedb "\201\303\031\301\v"
        ol = 0x6fa8bff4 "p\233\003"
        olst = 4
        chl = 0
        ne = 0
        ocs = 1873222770
        ret = 0
        dat = {1877915328, 2006971800}
        active = 1
#4  0x6fa7975f in expandorcomplete (args=0x6fa8fd40) at zle_tricky.c:315
        ret = 2006972408
#5  0x6fa79302 in completecall (args=0x6fa8fd40) at zle_tricky.c:208
No locals.
#6  0x6fa68fcd in execzlefunc () from /usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#7  0x6fa691f2 in zlecore () from /usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#8  0x6fa697f9 in zleread () from /usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
---Type <return> to continue, or q <return> to quit---
#9  0x6fa6b867 in zle_main_entry () from
/usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#10 0x08086cda in zleentry (cmd=1) at init.c:1304
        ret = 0x0
        ap = 0x779ff8f4 "\004\071\017\b\214\070\017\b\a"
#11 0x08087b93 in inputline ()
No symbol table info available.
#12 0x08087dc8 in ingetc ()
No symbol table info available.
#13 0x0807d595 in ihgetc () at hist.c:263
        c = 0
#14 0x08091c26 in zshlex ()
No symbol table info available.
#15 0x080ab108 in parse_event () at parse.c:451
No locals.
#16 0x08084209 in loop (toplevel=1, justonce=0) at init.c:132
        prog = 0x6fb89ab0
        err = 50
        non_empty = 1
#17 0x08087053 in zsh_main (argc=1, argv=0x779ffaf4) at init.c:1454
        t = 0x779ffaf8
        t0 = 158
#18 0x08055522 in main ()
No symbol table info available.
(gdb) s
Single stepping until exit from function zshlex,
which has no line number information.
ihgetc () at hist.c:263
263	    int c = ingetc();
(gdb)
265	    qbang = 0;
(gdb)
266	    if (!stophist && !(inbufflags & INP_ALIAS)) {
(gdb)
275	    if ((inbufflags & INP_HIST) && !stophist) {
(gdb)
286	    } else if (stophist || (inbufflags & INP_ALIAS))
(gdb)
294		qbang = c == bangchar && (stophist < 2);
(gdb)
295	    hwaddc(c);
(gdb)
ihwaddc (c=46) at hist.c:212
212	    if (chline && !(errflag || lexstop)) {
(gdb)
214		if (c == bangchar && stophist < 2 && qbang)
(gdb)
221		*hptr++ = c;
(gdb)
224		if (hptr - chline >= hlinesz) {
(gdb)
231	}
(gdb)
ihgetc () at hist.c:296
296	    addtoline(c);
(gdb)
iaddtoline (c=46) at hist.c:242
242	    if (!expanding || lexstop)
(gdb)
244	    if (qbang && c == bangchar && stophist < 2) {
(gdb)
248	    if (excs > zlemetacs) {
(gdb)
249		excs += 1 + inbufct - exlast;
(gdb)
250		if (excs < zlemetacs)
(gdb)
255	    exlast = inbufct;
(gdb)
256	    zleentry(ZLE_CMD_ADD_TO_LINE, itok(c) ? ztokens[c - Pound] : c);
(gdb)
zleentry (cmd=2) at init.c:1273
1273	    char *ret = NULL;
(gdb)
1277	    VA_START(ap, cmd);
(gdb)
1282	    switch (zle_load_state) {
(gdb)
1304		ret = zle_entry_ptr(cmd, ap);
(gdb)
1306		cmd = -1;
(gdb)
1315	    switch (cmd) {
(gdb)
1353	    return ret;
(gdb)
1354	}
(gdb)
iaddtoline (c=46) at hist.c:257
257	}
(gdb)
ihgetc () at hist.c:298
298	    return c;
(gdb)
299	}
(gdb)
0x08091c26 in zshlex ()
(gdb)
Single stepping until exit from function zshlex,
which has no line number information.
ihwbegin (offset=-1) at hist.c:1300
1300	    if (stophist == 2)
(gdb)
1302	    if (chwordpos%2)
(gdb)
1307	    if ((inbufflags & INP_ALIAS) && !(inbufflags & INP_HIST))
(gdb)
1310		hwgetword = -1;
(gdb)
1311	    chwords[chwordpos++] = hptr - chline + offset;
(gdb)
1312	}
(gdb)
0x08091dea in zshlex ()
(gdb)
Single stepping until exit from function zshlex,
which has no line number information.
0x080927ab in ctxtlex ()
(gdb)
Single stepping until exit from function ctxtlex,
which has no line number information.
doexpandhist () at zle_tricky.c:2663
2663	    } while (tok != ENDINPUT && tok != LEXERR);
(gdb)
2662		ctxtlex();
(gdb)

Breakpoint 1, 0x08091bf6 in zshlex ()
(gdb)
Single stepping until exit from function zshlex,
which has no line number information.
ihgetc () at hist.c:263
263	    int c = ingetc();
(gdb)
265	    qbang = 0;
(gdb)
266	    if (!stophist && !(inbufflags & INP_ALIAS)) {
(gdb)
275	    if ((inbufflags & INP_HIST) && !stophist) {
(gdb)
286	    } else if (stophist || (inbufflags & INP_ALIAS))
(gdb)
294		qbang = c == bangchar && (stophist < 2);
(gdb)
295	    hwaddc(c);
(gdb)
ihwaddc (c=32) at hist.c:212
212	    if (chline && !(errflag || lexstop)) {
(gdb)
231	}
(gdb)
ihgetc () at hist.c:296
296	    addtoline(c);
(gdb)
iaddtoline (c=32) at hist.c:242
242	    if (!expanding || lexstop)
(gdb)
257	}
(gdb)
ihgetc () at hist.c:298
298	    return c;
(gdb)
299	}
(gdb)
0x08091c26 in zshlex ()
(gdb)
Single stepping until exit from function zshlex,
which has no line number information.
0x080927ab in ctxtlex ()
(gdb)
Single stepping until exit from function ctxtlex,
which has no line number information.
doexpandhist () at zle_tricky.c:2663
2663	    } while (tok != ENDINPUT && tok != LEXERR);
(gdb)
2664	    while (!lexstop)
(gdb)
2669	    err = errflag;
(gdb)
2670	    noerrs = ne;
(gdb)
2671	    noaliases = ona;
(gdb)
2672	    strinend();
(gdb)













strinend () at hist.c:799
799	    hend(NULL);
(gdb)
hend (prog=0x0) at hist.c:1144
1144	    LinkList hookargs = newlinklist();
(gdb)
1145	    int flag, save = 1, hookret, stack_pos = histsave_stack_pos;
(gdb)
1150	    queue_signals();
(gdb)
1151	    if (histdone & HISTFLAG_SETTY)
(gdb)
1153	    if (!(histactive & HA_NOINC))
(gdb)
1155	    if (histactive & HA_NOINC) {
(gdb)
1156		zfree(chline, hlinesz);
(gdb)
1157		zfree(chwords, chwordlen*sizeof(short));
(gdb)
1158		chline = NULL;
(gdb)
1159		chwords = NULL;
(gdb)
1160		histactive = 0;
(gdb)
1161		unqueue_signals();
(gdb)
1162		return 1;
(gdb)
1287	}
(gdb)
strinend () at hist.c:801
801	    strin--;
(gdb)
802	    isfirstch = 1;
(gdb)
803	    histdone = 0;
(gdb)
804	}
(gdb)
doexpandhist () at zle_tricky.c:2673
2673	    inpop();
(gdb)

2674	    zleparse = 0;
(gdb)
2675	    lexrestore();
(gdb)
2676	    expanding = 0;
(gdb)
2678	    if (!err) {
(gdb)
2679		zlemetacs = excs;
(gdb)
2680		if (strcmp(zlemetaline, ol)) {
(gdb)
2692	    strcpy(zlemetaline, ol);
(gdb)
2693	    zlemetall = oll;
(gdb)
2694	    zlemetacs = ocs;
(gdb)
2695	    unmetafy_line();
(gdb)

unmetafy_line () at zle_tricky.c:978
978	    zlemetaline[zlemetall] = '\0';
(gdb)
979	    zleline = stringaszleline(zlemetaline, zlemetacs, &zlell,
&linesz, &zlecs);
(gdb)
981	    free(zlemetaline);
(gdb)
982	    zlemetaline = NULL;
(gdb)
987	    CCRIGHT();
(gdb)
988	}
(gdb)
doexpandhist () at zle_tricky.c:2697
2697	    popheap();
(gdb)
2699	    return 0;
(gdb)
2700	}
(gdb)
docomplete (lst=4) at zle_tricky.c:629
629	    metafy_line();
(gdb)
metafy_line () at zle_tricky.c:960
960	    zlemetaline = zlelineasstring(zleline, zlell, zlecs,
(gdb)
962	    metalinesz = zlemetall;
(gdb)
967	    free(zleline);
(gdb)
968	    zleline = NULL;
(gdb)
969	}
(gdb) print zlemetaline
$1 = 0x8223058 "./"
(gdb) s
docomplete (lst=4) at zle_tricky.c:631
631	    ocs = zlemetacs;
(gdb) print ocs
$2 = 1873222770
(gdb) print zlemetacs
$3 = 2
(gdb) s
632	    origline = dupstring(zlemetaline);
(gdb)
633	    origcs = zlemetacs;
(gdb) print origline
$4 = 0x6fb89740 "./"
(gdb) s
634	    origll = zlemetall;
(gdb) print origcs
$5 = 2
(gdb) s
635	    if (!isfirstln && chline != NULL) {
(gdb) print origll
$6 = 2
(gdb) s
648		ol = NULL;
(gdb)
649	    inwhat = IN_NOTHING;
(gdb)
650	    zsfree(qipre);
(gdb)
651	    qipre = ztrdup("");
(gdb)
652	    zsfree(qisuf);
(gdb)
653	    qisuf = ztrdup("");
(gdb)
654	    zsfree(autoq);
(gdb)
655	    autoq = NULL;
(gdb)
658	    noerrs = 1;
(gdb)
659	    s = get_comp_string();
(gdb)

Breakpoint 2, get_comp_string () at zle_tricky.c:1067
1067	    int t0, tt0, i, j, k, cp, rd, sl, ocs, ins, oins, ia, parct, varq = 0;
(gdb) frame 1
#1  0x6fa7a2bc in docomplete (lst=4) at zle_tricky.c:659
659	    s = get_comp_string();
(gdb) print s
$7 = 0x41b6cedb "\201\303\031\301\v"
(gdb) frame 0
#0  get_comp_string () at zle_tricky.c:1067
1067	    int t0, tt0, i, j, k, cp, rd, sl, ocs, ins, oins, ia, parct, varq = 0;
(gdb) bt full
#0  get_comp_string () at zle_tricky.c:1067
        t0 = 0
        tt0 = 137351280
        i = 2006971508
        j = 2006971636
        k = 2006971576
        cp = 136458330
        rd = 1103269876
        sl = 136458330
        ocs = 0
        ins = 1103269876
        oins = 1102143328
        ia = 136458329
        parct = 2006971560
        varq = 1102499901
        ona = 135251752
        qsub = 2006971504
        zlemetacs_qsub = 2006971540
        redirpos = 2006971576
        s = 0x6fb89740 "./"
        tmp = 0x82fc830 "MMAND"
        p = 0x0
        tt = 0x779ff498
"\333ÎA\364\277\250oZ0\"\bt\r\266A\b\365\237w</\250oX0\"\b
\241\302A\030"
        rdop = "_0\"\b\030\364\237wY0\"\b\001\000\000\000\060\310/\b"
        linptr = 0x0
        u = 0x1 <Address 0x1 out of bounds>
#1  0x6fa7a2bc in docomplete (lst=4) at zle_tricky.c:659
        s = 0x41b6cedb "\201\303\031\301\v"
        ol = 0x0
        olst = 4
---Type <return> to continue, or q <return> to quit---
        chl = 0
        ne = 0
        ocs = 2
        ret = 0
        dat = {1877915328, 2006971800}
        active = 1
#2  0x6fa7975f in expandorcomplete (args=0x6fa8fd40) at zle_tricky.c:315
        ret = 2006972408
#3  0x6fa79302 in completecall (args=0x6fa8fd40) at zle_tricky.c:208
No locals.
#4  0x6fa68fcd in execzlefunc () from /usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#5  0x6fa691f2 in zlecore () from /usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#6  0x6fa697f9 in zleread () from /usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#7  0x6fa6b867 in zle_main_entry () from
/usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#8  0x08086cda in zleentry (cmd=1) at init.c:1304
        ret = 0x0
        ap = 0x779ff8f4 "\004\071\017\b\214\070\017\b\a"
#9  0x08087b93 in inputline ()
No symbol table info available.
#10 0x08087dc8 in ingetc ()
No symbol table info available.
#11 0x0807d595 in ihgetc () at hist.c:263
        c = 0
#12 0x08091c26 in zshlex ()
No symbol table info available.
#13 0x080ab108 in parse_event () at parse.c:451
No locals.
---Type <return> to continue, or q <return> to quit---
#14 0x08084209 in loop (toplevel=1, justonce=0) at init.c:132
        prog = 0x6fb89ab0
        err = 50
        non_empty = 1
#15 0x08087053 in zsh_main (argc=1, argv=0x779ffaf4) at init.c:1454
        t = 0x779ffaf8
        t0 = 158
#16 0x08055522 in main ()
No symbol table info available.
(gdb) s
1068	    int ona = noaliases;
(gdb)
1079	    int qsub, zlemetacs_qsub = 0;
(gdb)
1086	    char *s = NULL, *tmp, *p, *tt = NULL, rdop[20];
(gdb)
1091	    freebrinfo(brbeg);
(gdb)

Breakpoint 1, 0x08091bf6 in zshlex ()
(gdb)
Single stepping until exit from function zshlex,
which has no line number information.
nohw (c=-1) at hist.c:812
812	}
(gdb)
0x08091dea in zshlex ()
(gdb)
Single stepping until exit from function zshlex,
which has no line number information.
0x080927ab in ctxtlex ()
(gdb)
Single stepping until exit from function ctxtlex,
which has no line number information.
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)
1237		    cmdstr = ztrdup(tokstr);
(gdb)
1239		    if (i != redirpos)
(gdb)
1242		if (!zleparse && !tt0) {
(gdb)
1244		    tt = tokstr ? dupstring(tokstr) : NULL;
(gdb)
1246	            if (isset(RCQUOTES) && tt) {
(gdb)
1247			char *tt1, *e = tt + zlemetacs - wb;
(gdb) print tokstr
$8 = 0x6fb89758 "."
(gdb) print tt
$9 = 0x6fb89778 "."
(gdb) s
1248			for (tt1 = tt; *tt1; tt1++) {
(gdb)
1249			    if (*tt1 == Snull) {
(gdb)
1248			for (tt1 = tt; *tt1; tt1++) {
(gdb)
1258		    if (addedx && tt)
(gdb)
1259			chuck(tt + zlemetacs - wb - qsub);
(gdb)

Breakpoint 1, 0x08091bf6 in zshlex ()
(gdb)
Single stepping until exit from function zshlex,
which has no line number information.
0x080927ab in ctxtlex ()
(gdb)
Single stepping until exit from function ctxtlex,
which has no line number information.
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)
1314	    clwnum = (tt || !i) ? i : i - 1;
(gdb)
1315	    zsfree(clwords[clwnum]);
(gdb) print clwnum
$10 = 1
(gdb) s
1316	    clwords[clwnum] = NULL;
(gdb)
1317	    t0 = tt0;
(gdb)
1318	    if (ia) {
(gdb) print t0
$11 = 34
(gdb) s
1322		lincmd = cp;
(gdb)
1323		linredir = rd;
(gdb)
1325	    strinend();
(gdb)
strinend () at hist.c:799
799	    hend(NULL);
(gdb)
hend (prog=0x0) at hist.c:1144
1144	    LinkList hookargs = newlinklist();
(gdb)
1145	    int flag, save = 1, hookret, stack_pos = histsave_stack_pos;
(gdb)
1150	    queue_signals();
(gdb)
1151	    if (histdone & HISTFLAG_SETTY)
(gdb)
1153	    if (!(histactive & HA_NOINC))
(gdb)
1155	    if (histactive & HA_NOINC) {
(gdb)
1156		zfree(chline, hlinesz);
(gdb)
1157		zfree(chwords, chwordlen*sizeof(short));
(gdb) print chwords
$12 = (short int *) 0x0
(gdb) s
1158		chline = NULL;
(gdb)
1159		chwords = NULL;
(gdb)
1160		histactive = 0;
(gdb)
1161		unqueue_signals();
(gdb)
1162		return 1;
(gdb)
1287	}
(gdb)
strinend () at hist.c:801
801	    strin--;
(gdb)
802	    isfirstch = 1;
(gdb)
803	    histdone = 0;
(gdb)
804	}
(gdb)
get_comp_string () at zle_tricky.c:1326
1326	    inpop();
(gdb)
1327	    errflag = zleparse = 0;
(gdb)
1328	    if (parbegin != -1) {
(gdb)
1346	    if (inwhat == IN_MATH)
(gdb)
1348	    else if (!t0 || t0 == ENDINPUT) {
(gdb)
1354	    } else if (t0 == STRING) {
(gdb) print s
$13 = 0x0
(gdb) print t0
$14 = 34
(gdb) bt full
#0  get_comp_string () at zle_tricky.c:1354
        t0 = 34
        tt0 = 34
        i = 1
        j = 0
        k = 0
        cp = 1
        rd = 0
        sl = 1
        ocs = 0
        ins = 0
        oins = 0
        ia = 0
        parct = 0
        varq = 0
        ona = 0
        qsub = 0
        zlemetacs_qsub = 2
        redirpos = 0
        s = 0x0
        tmp = 0x8223058 "./"
        p = 0x0
        tt = 0x6fb89778 "."
        rdop = "\000\060\"\b\030\364\237wY0\"\b\001\000\000\000\060\310/\b"
        linptr = 0x6fb89748 "./x"
        u = 0x822305a ""
#1  0x6fa7a2bc in docomplete (lst=4) at zle_tricky.c:659
        s = 0x41b6cedb "\201\303\031\301\v"
        ol = 0x0
        olst = 4
        chl = 0
---Type <return> to continue, or q <return> to quit---
        ne = 0
        ocs = 2
        ret = 0
        dat = {1877915328, 2006971800}
        active = 1
#2  0x6fa7975f in expandorcomplete (args=0x6fa8fd40) at zle_tricky.c:315
        ret = 2006972408
#3  0x6fa79302 in completecall (args=0x6fa8fd40) at zle_tricky.c:208
No locals.
#4  0x6fa68fcd in execzlefunc () from /usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#5  0x6fa691f2 in zlecore () from /usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#6  0x6fa697f9 in zleread () from /usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#7  0x6fa6b867 in zle_main_entry () from
/usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#8  0x08086cda in zleentry (cmd=1) at init.c:1304
        ret = 0x0
        ap = 0x779ff8f4 "\004\071\017\b\214\070\017\b\a"
#9  0x08087b93 in inputline ()
No symbol table info available.
#10 0x08087dc8 in ingetc ()
No symbol table info available.
#11 0x0807d595 in ihgetc () at hist.c:263
        c = 0
#12 0x08091c26 in zshlex ()
No symbol table info available.
#13 0x080ab108 in parse_event () at parse.c:451
No locals.
#14 0x08084209 in loop (toplevel=1, justonce=0) at init.c:132
---Type <return> to continue, or q <return> to quit---
        prog = 0x6fb89ab0
        err = 50
        non_empty = 1
#15 0x08087053 in zsh_main (argc=1, argv=0x779ffaf4) at init.c:1454
        t = 0x779ffaf8
        t0 = 158
#16 0x08055522 in main ()
No symbol table info available.
(gdb) s
1356		s = ztrdup(clwords[clwpos]);
(gdb) print clwpos
$15 = 0
(gdb) print clwords[0]
$16 = 0x82fb758 ""
(gdb) print clwords[1]
$17 = 0x0
(gdb) s
1403	    if (we > zlemetall)
(gdb)
1405	    tt = zlemetaline;
(gdb)
1406	    if (tmp) {
(gdb) print tt
$18 = 0x6fb89748 "./x"
(gdb) print tmp
$19 = 0x8223058 "./"
(gdb) s
1407		zlemetaline = tmp;
(gdb)
1408		zlemetall = strlen(zlemetaline);
(gdb)
1410	    if (t0 != STRING && inwhat != IN_MATH) {
(gdb) print zlemetall
$20 = 2
(gdb) print zlemetaline
$21 = 0x8223058 "./"
(gdb) s
1423	    noaliases = ona;
(gdb)
1430	    if (inwhat != IN_MATH) {
(gdb)
1431		char *nnb, *nb = NULL, *ne = NULL;
(gdb)
1433		i = 0;
(gdb)
1434		MB_METACHARINIT();
(gdb)
mb_metacharinit () at utils.c:448
448	    memset(&mb_shiftstate, 0, sizeof(mb_shiftstate));
(gdb)
449	}
(gdb)
get_comp_string () at zle_tricky.c:1435
1435		if (itype_end(s, IIDENT, 1) == s)
(gdb)
itype_end (ptr=0x82fb7a0 "", itype=128, once=1) at utils.c:3308
3308	    if (isset(MULTIBYTE) &&
(gdb)
3310		mb_metacharinit();
(gdb)
mb_metacharinit () at utils.c:448
448	    memset(&mb_shiftstate, 0, sizeof(mb_shiftstate));
(gdb)
449	}
(gdb)
itype_end (ptr=0x82fb7a0 "", itype=128, once=1) at utils.c:3311
3311		while (*ptr) {
(gdb)
3376	    return (char *)ptr;
(gdb)
3377	}
(gdb)
get_comp_string () at zle_tricky.c:1436
1436		    nnb = s + MB_METACHARLEN(s);
(gdb)
mb_metacharlenconv (s=0x82fb7a0 "", wcp=0x0) at utils.c:4254
4254	    if (!isset(MULTIBYTE)) {
(gdb)
4270	    if (itok(*s)) {
(gdb)
4276	    return mb_metacharlenconv_r(s, wcp, &mb_shiftstate);
(gdb)
mb_metacharlenconv_r (s=0x82fb7a0 "", wcp=0x0, mbsp=0x80f0ccc) at utils.c:4205
4205	    size_t ret = MB_INVALID;
(gdb)
4210	    for (ptr = s; *ptr; ) {
(gdb)
4229	    if (wcp)
(gdb) print s
$22 = 0x82fb7a0 ""
(gdb) s
4232	    memset(mbsp, 0, sizeof(*mbsp));
(gdb)
4233	    if (ptr > s) {
(gdb) print ptr
$23 = 0x82fb7a0 ""
(gdb) s
4236		return 0;		/* Probably shouldn't happen */
(gdb) bt full
#0  mb_metacharlenconv_r (s=0x82fb7a0 "", wcp=0x0, mbsp=0x80f0ccc) at
utils.c:4236
        ret = 4294967295
        inchar = 0 '\000'
        ptr = 0x82fb7a0 ""
        wc = 238448 L'p'
#1  0x080d4e67 in mb_metacharlenconv (s=0x82fb7a0 "", wcp=0x0) at utils.c:4276
No locals.
#2  0x6fa7c97c in get_comp_string () at zle_tricky.c:1436
        nnb = 0x779ff448 "H\227\270oZ0\"\by\227\270oz\227\270o\001"
        nb = 0x0
        ne = 0x0
        t0 = 34
        tt0 = 34
        i = 0
        j = 0
        k = 0
        cp = 1
        rd = 0
        sl = 1
        ocs = 0
        ins = 0
        oins = 0
        ia = 0
        parct = 0
        varq = 0
        ona = 0
        qsub = 0
        zlemetacs_qsub = 2
        redirpos = 0
        s = 0x82fb7a0 ""
        tmp = 0x8223058 "./"
---Type <return> to continue, or q <return> to quit---
        p = 0x0
        tt = 0x6fb89748 "./x"
        rdop = "\000\060\"\b\030\364\237wY0\"\b\001\000\000\000\060\310/\b"
        linptr = 0x6fb89748 "./x"
        u = 0x822305a ""
#3  0x6fa7a2bc in docomplete (lst=4) at zle_tricky.c:659
        s = 0x41b6cedb "\201\303\031\301\v"
        ol = 0x0
        olst = 4
        chl = 0
        ne = 0
        ocs = 2
        ret = 0
        dat = {1877915328, 2006971800}
        active = 1
#4  0x6fa7975f in expandorcomplete (args=0x6fa8fd40) at zle_tricky.c:315
        ret = 2006972408
#5  0x6fa79302 in completecall (args=0x6fa8fd40) at zle_tricky.c:208
No locals.
#6  0x6fa68fcd in execzlefunc () from /usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#7  0x6fa691f2 in zlecore () from /usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#8  0x6fa697f9 in zleread () from /usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#9  0x6fa6b867 in zle_main_entry () from
/usr/local/lib/zsh/4.3.10-dev-1/zsh/zle.so
No symbol table info available.
#10 0x08086cda in zleentry (cmd=1) at init.c:1304
        ret = 0x0
        ap = 0x779ff8f4 "\004\071\017\b\214\070\017\b\a"
#11 0x08087b93 in inputline ()
---Type <return> to continue, or q <return> to quit---
No symbol table info available.
#12 0x08087dc8 in ingetc ()
No symbol table info available.
#13 0x0807d595 in ihgetc () at hist.c:263
        c = 0
#14 0x08091c26 in zshlex ()
No symbol table info available.
#15 0x080ab108 in parse_event () at parse.c:451
No locals.
#16 0x08084209 in loop (toplevel=1, justonce=0) at init.c:132
        prog = 0x6fb89ab0
        err = 50
        non_empty = 1
#17 0x08087053 in zsh_main (argc=1, argv=0x779ffaf4) at init.c:1454
        t = 0x779ffaf8
        t0 = 158
#18 0x08055522 in main ()
No symbol table info available.
(gdb) s
4237	}
(gdb)
mb_metacharlenconv (s=0x82fb7a0 "", wcp=0x0) at utils.c:4277
4277	}
(gdb)
get_comp_string () at zle_tricky.c:1439
1439		for (tt = s; tt < s + zlemetacs_qsub - wb;) {
(gdb) print tt
$24 = 0x6fb89748 "./x"
(gdb) print s
$25 = 0x82fb7a0 ""
(gdb) print zlemetacs_qsub
$26 = 2
(gdb) print wb
$27 = 0

(and at this point the infinite loop starts)

-- 
Mikael Magnusson



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