zsh-workers
 help / color / mirror / code / Atom feed
From: "Wischnowsky, Sven" <Sven.Wischnowsky@t-systems.de>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH (4.0.x, 4.1.x): Re: Core dump bug in ZSH version 3.0.7
Date: Wed, 14 Nov 2001 09:57:26 +0100	[thread overview]
Message-ID: <7D865FB0D0A1D5118B6E000347055BBB14847A@G9JNT.mgb01.telekom.de> (raw)


[ Hi, folks! ]

Bart wrote:

> On Nov 12,  6:59pm, Bart Schaefer wrote:
> } Subject: Re: Core dump bug in ZSH version 3.0.7
> }
> } It doesn't crash 4.0.x/4.1.x, but it does get into a rather 
> strange state,
> } trying to read a here-document whose start/end string is a 
> single space,
> } which of course is impossible (so you're trapped in the 
> here-document until
> } you interrupt somehow).
> } 
> } zagzig% mask = (1 << string.atoi(sys.argv[1])) - 1
> } zsh: parse error near `)'
> 
> At this point we've parsed this as the command "mask" with 
> arguments "="
> and "(1" and with here-document ending at 
> "string.atoi(sys.argv[1])"; the
> parse error is at the second parenthesis.
> 
> However, when zsh bailed out with the parse error, it failed 
> to pop the
> pending here-document off the queue of such documents. 

Exactly.

> So 
> then when it
> begins parsing this:
> 
> } zagzig% key = string.atoi(sys.argv[2])
> } heredoc>  

(Actually, just hitting Return shows the bug - the prompt changes from normal
to `heredoc', whew.)

>  	    return 0;
>  	}
>  	yyerror(1);
> +	while (hdocs) {
> +	    struct heredocs *next = hdocs->next;
> +	    zfree(hdocs, sizeof(struct heredocs));
> +	    hdocs = next;
> +	}
>  	herrflush();
>  	if (noerrs != 2)
>  	    errflag = 1;

I built a similar patch yesterday evening, but then forgot to bring it
with me today. (I'm terribly net-handicapped at the moment, because I'm
behind a fiendish firewall in a disgusting Windows-net here and don't
have my Unix-box yet, so I couldn't commit the change myself anyway.)

My change put that cleanup-loop in a separate function, though, and made
that function be called anywhere where we call bld_eprog() (if (success)),
just to make sure...

Bye
  Sven

P.S.: My other computer will be put into a different net here so I hope to
      be able to participate again when it arrives. Also, my E-mail address
      will be wischnow@berkom.de, not the one above (the berkom-address is
      already functional, forwarded telekom.de).


             reply	other threads:[~2001-11-14  8:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-14  8:57 Wischnowsky, Sven [this message]
2001-11-15  5:38 ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2001-11-15  8:13 Wischnowsky, Sven
2001-11-12 18:28 Carl Feynman
2001-11-12 18:59 ` Bart Schaefer
2001-11-13 18:21   ` PATCH (4.0.x, 4.1.x): " Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7D865FB0D0A1D5118B6E000347055BBB14847A@G9JNT.mgb01.telekom.de \
    --to=sven.wischnowsky@t-systems.de \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).