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

Re: Menu selection



Sorry to be the bearer of bad news...

I'm still seeing problems with the changes made to menu-select/vi-insert.
Below is the same simple recipe that causes the problem.  Also, attached is the
output of this recipe run under valgrind.   It points to memory reads of
data that has already been free'd.

I actually don't really use this functionality much, but hope it might
someday be used in a version of history-incremental-search-*ward.
So that the incremental search can use a matching-spec....

-FR.

host% autoload -U compinit; compinit -D
host% zmodload zsh/complist
host% bindkey "^Bm" menu-select
host% bindkey "^Bi" vi-insert
host% mkdir bug ; cd bug
host% touch a  a-b.c  a-c.d  a.b.c  b  ba  bb  c
host% more ^Bm^Bia.
interactive: a.b.c[]
BUG: listmatches called with bogus list




==12482== valgrind-1.0pre6, a memory error detector for x86 GNU/Linux.
==12482== Copyright (C) 2000-2002, and GNU GPL'd, by Julian Seward.
==12482== Invalid read of size 4
==12482==    at 0x4126C911: do_ambig_menu (compresult.c:1318)
==12482==    by 0x4125A75A: do_completion (compcore.c:364)
==12482==    by 0x8090E23: runhookdef (module.c:1858)
==12482==    by 0x411E7E83: docompletion (zle_tricky.c:1824)
==12482==    Address 0x43566084 is 16 bytes inside a block of size 112 free'd
==12482==    at 0x40046A09: free (vg_clientfuncs.c:171)
==12482==    by 0x412639B4: freematches (compcore.c:3072)
==12482==    by 0x4126F5D2: invalidate_list (compresult.c:2175)
==12482==    by 0x8090E23: runhookdef (module.c:1858)
==12482== 
==12482== Invalid read of size 4
==12482==    at 0x4126C98D: do_ambig_menu (compresult.c:1330)
==12482==    by 0x4125A75A: do_completion (compcore.c:364)
==12482==    by 0x8090E23: runhookdef (module.c:1858)
==12482==    by 0x411E7E83: docompletion (zle_tricky.c:1824)
==12482==    Address 0x43566088 is 20 bytes inside a block of size 112 free'd
==12482==    at 0x40046A09: free (vg_clientfuncs.c:171)
==12482==    by 0x412639B4: freematches (compcore.c:3072)
==12482==    by 0x4126F5D2: invalidate_list (compresult.c:2175)
==12482==    by 0x8090E23: runhookdef (module.c:1858)
==12482== 
==12482== Invalid read of size 4
==12482==    at 0x439299D4: domenuselect (complist.c:2219)
==12482==    by 0x4392B8A3: menuselect (complist.c:2847)
==12482==    by 0x411D6EBE: execzlefunc (zle_main.c:862)
==12482==    by 0x411D65DA: zlecore (zle_main.c:660)
==12482==    Address 0x43566114 is 0 bytes inside a block of size 8 free'd
==12482==    at 0x40046A09: free (vg_clientfuncs.c:171)
==12482==    by 0x41263926: freematches (compcore.c:3058)
==12482==    by 0x4126F5D2: invalidate_list (compresult.c:2175)
==12482==    by 0x8090E23: runhookdef (module.c:1858)
==12482== 
==12482== Invalid read of size 4
==12482==    at 0x43929B1E: domenuselect (complist.c:2247)
==12482==    by 0x4392B8A3: menuselect (complist.c:2847)
==12482==    by 0x411D6EBE: execzlefunc (zle_main.c:862)
==12482==    by 0x411D65DA: zlecore (zle_main.c:660)
==12482==    Address 0x43566114 is 0 bytes inside a block of size 8 free'd
==12482==    at 0x40046A09: free (vg_clientfuncs.c:171)
==12482==    by 0x41263926: freematches (compcore.c:3058)
==12482==    by 0x4126F5D2: invalidate_list (compresult.c:2175)
==12482==    by 0x8090E23: runhookdef (module.c:1858)
==12482== 
==12482== Invalid read of size 4
==12482==    at 0x43929B23: domenuselect (complist.c:2247)
==12482==    by 0x4392B8A3: menuselect (complist.c:2847)
==12482==    by 0x411D6EBE: execzlefunc (zle_main.c:862)
==12482==    by 0x411D65DA: zlecore (zle_main.c:660)
==12482==    Address 0x4357A618 is 80 bytes inside a block of size 92 free'd
==12482==    at 0x40046A09: free (vg_clientfuncs.c:171)
==12482==    by 0x808CBDB: zfree (mem.c:1391)
==12482==    by 0x412638AC: freematch (compcore.c:3040)
==12482==    by 0x4126390D: freematches (compcore.c:3057)


__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com



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