zsh-workers
 help / color / mirror / code / Atom feed
From: Richard Coleman <coleman@math.gatech.edu>
To: zsh-workers@math.gatech.edu
Subject: Re: seg fault on $(dgqhghdqwdhqwjq) : beta19
Date: Mon, 27 May 1996 00:29:59 -0400	[thread overview]
Message-ID: <199605270430.AAA29508@redwood.skiles.gatech.edu> (raw)
In-Reply-To: Your message of "Mon, 27 May 1996 03:13:45 +0200." <199605270113.DAA01134@hzoli.ppp.cs.elte.hu>

> > res1% $(wekdwqw)
> > zsh: command not found: wekdwqw
> > zsh: 21441 segmentation fault  $(wekdwqw)
> 
> It always happens when prefork() in execcmd() removes all arguments.
> Eg. $foo triggers the bug if foo is not set.  Richard did several changes
> related to this and I think this bug appeared with these changes.  Richard,
> could you check it?
> 
> Zoltan
> 

I recently removed the piece of code

    if (empty(args)) {
        zerr("no command", NULL, 0);
        _exit(1);
    }

from the beginning of execute() in exec.c since `args' should not
be empty at this point.  It appears this uncovered a bug higher up
the execution pipeline (this was my very intention, of course).
Rather than putting this piece of code back, we should probably fix
this in execcmd() or prefork().

There were a couple of other places I removed such checks.  I hate
these types of checks since they cover up bugs rather than fix them.
In my opinion, the check in dotrap() for errflag (which was recently
added) is in this category.  If errflag=1, then you shouldn't have
called dotrap in the first place.

rc




  parent reply	other threads:[~1996-05-27  4:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-24 21:06 Anthony Heading
1996-05-25  0:58 ` Hrvoje Niksic
1996-05-27  1:13 ` Zoltan Hidvegi
1996-05-27  2:38   ` Thorsten Meinecke
1996-05-27 13:09     ` Zefram
1996-05-27 16:23       ` Thorsten Meinecke
1996-05-27 17:05         ` Zefram
1996-05-27  4:29   ` Richard Coleman [this message]
1996-05-27 17:02   ` Peter Stephenson

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=199605270430.AAA29508@redwood.skiles.gatech.edu \
    --to=coleman@math.gatech.edu \
    --cc=zsh-workers@math.gatech.edu \
    /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).