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

Re: Where to start debugging zle recursive-edit? / Ctrl-C



On Sep 29, 11:30am, Sebastian Gniazdowski wrote:
} Subject: Re: Where to start debugging zle recursive-edit? / Ctrl-C
} 
} I've got a suspicious effect, after smoothly running no-opt binary for
} few days - couldn't recall if I spotted anything suspicious. The
} effect is message at shell startup:
} 
} TRAPALRM: scalar parameter abcdef created globally in function TRAPALRM"
} 
} [...]
} 
} and only "setopt localoptions warncreateglobal" from z-sy-h was
} reported. Zshrc has at the end:
} 
} TRAPALRM() { abcdef=$(( abcdef + 1 )); }
} TMOUT=1

So what's happening is that z-sy-h begins executing, and then *while* it
is executing, the first TMOUT occurs and TRAPALRM executes.  It therefore
picks up the warncreateglobal from the z-sy-h context and so you get the
warning about the assignment to abcdef.

This could happen any time that z-sy-h is active simultaneously with the
TMOUT alarm.

} Crash related to Ctrl-C appeared in uncanny situations
} AFAIR like Ctrl-R, Ctrl-C multiple times, then menu search completion
} with also Ctrl-C, something like this, hard to reproduce.

Memory management for menu selection is known to be somewhat fragile;
other crashes have occurred there.  Usually this seems to happen when
tracking of where things should be drawn on the screen gets out of
sync with the data structures describing what to draw, see for example
workers/37961 (commit f07a1bd0).  It would not surprise me to find
that an ill-timed interrupt could result in the same sort of problem.

There are some queue_signals() regions in complist.c but they're very
narrowly defined.



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