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

add-zle-hook-widget: infinite recursion ("job table full or recursion limit exceeded")



It's trivial to trigger:

% Src/zsh -fc 'autoload add-zle-hook-widget; f() {}; add-zle-hook-widget zle-line-pre-redraw f' 
add-zle-hook-widget:182: job table full or recursion limit exceeded
zsh: exit 1     $prefix/zsh/bin/zsh -fc 

Here's the trace:

% Src/zsh -x -fc 'autoload add-zle-hook-widget; f() {}; add-zle-hook-widget zle-line-pre-redraw f' 2>&1 | head -30
+zsh:1> autoload add-zle-hook-widget
+zsh:1> add-zle-hook-widget zle-line-pre-redraw f
+add-zle-hook-widget:21> '(anon)' zle-line-pre-redraw f
+(anon):2> emulate -L zsh
+(anon):5> zmodload -e zsh/zle
+(anon):5> return 1
+add-zle-hook-widget:178> case cmdarg shfunc loadautofunc (*file)
+add-zle-hook-widget:178> case cmdarg shfunc loadautofunc (*evalautofunc)
+add-zle-hook-widget:178> case cmdarg shfunc loadautofunc (*loadautofunc)
+add-zle-hook-widget:181> add-zle-hook-widget zle-line-pre-redraw f
+add-zle-hook-widget:21> '(anon)' zle-line-pre-redraw f
+(anon):2> emulate -L zsh
+(anon):5> zmodload -e zsh/zle
+(anon):5> return 1
+add-zle-hook-widget:178> case cmdarg shfunc loadautofunc shfunc (*file)
+add-zle-hook-widget:178> case cmdarg shfunc loadautofunc shfunc (*evalautofunc)
+add-zle-hook-widget:178> case cmdarg shfunc loadautofunc shfunc (*loadautofunc)
+add-zle-hook-widget:178> case cmdarg shfunc loadautofunc shfunc (*)
+add-zle-hook-widget:182> [[ -o kshautoload ]]
+add-zle-hook-widget:182> add-zle-hook-widget zle-line-pre-redraw f
+add-zle-hook-widget:21> '(anon)' zle-line-pre-redraw f
+(anon):2> emulate -L zsh
+(anon):5> zmodload -e zsh/zle
+(anon):5> return 1
+add-zle-hook-widget:178> case cmdarg shfunc loadautofunc shfunc shfunc (*file)
+add-zle-hook-widget:178> case cmdarg shfunc loadautofunc shfunc shfunc (*evalautofunc)
+add-zle-hook-widget:178> case cmdarg shfunc loadautofunc shfunc shfunc (*loadautofunc)
+add-zle-hook-widget:178> case cmdarg shfunc loadautofunc shfunc shfunc (*)
+add-zle-hook-widget:182> [[ -o kshautoload ]]
+add-zle-hook-widget:182> add-zle-hook-widget zle-line-pre-redraw f
zsh: broken pipe  $prefix/zsh/bin/zsh -x -fc  2>&1 | 
zsh: done         head -30

Running 'zmodload zsh/zle' before the call appears to prevent hte
problem.  I can do that in my callsite (z-sy-h's "make check"), but
I assume zsh shouldn't enter an infinite loop, either.

Cheers,

Daniel



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