Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Wordcode functions with empty bodies
- X-seq: zsh-workers 11897
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Wordcode functions with empty bodies
- Date: Wed, 14 Jun 2000 16:28:21 +0200 (MET DST)
- In-reply-to: Peter Stephenson's message of Wed, 14 Jun 2000 15:03:04 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Peter Stephenson wrote:
> > If you can
> > find a particular chunk of code which seems to be doing something wrong
> > (shorter than the complete traps test) I'll have a look at it sometime.
>
> While I'm waiting, there's something obviously wrong with the way exit
> tests are unset, but this looks too simple to be the source of everyone's
> problems --- which generically stem from the fact that traps can take two
> forms which are stored in the same place but manipulated in different ways.
No need to wait...
Try this: start with -f, autoload promptinit and call it. Then install
break points at settrap(), freeeprog() and endtrapscope(). For even
more fun, do `display sigfuncs[28]' (SIGWINCH). Now type `prompt bart'.
It first hits some rather uninteresting break points, then settrap()
which installs the handler for SIGWINCH (from setfunction() in
parameter.c). Fine. Continue, it hits endtrapscode() and from there
frees the eprog in sigfuncs[28]. BUT it doesn't reset sigfuncs[28].
Continue again until you get to the shell prompt. Type `echo <RET>'
(this makes the memory for the eprog be freed) and look at
*sigfuncs[28]: garbage.
If you want to get the full picture: set a break point at
signals.c:675 and continue till there. It is now trying to dupeprog()
the thing in sigfuncs[28] -- kaboom.
So, where do we need to put the `sigfuncs[sig] = NULL'?
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author