zsh-users
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: "Paulo César Pereira de Andrade"
	<paulo.cesar.pereira.de.andrade@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: $HOME not set and zsh crashing in emulation mode
Date: Thu, 27 Oct 2016 20:19:07 +0000	[thread overview]
Message-ID: <20161027201907.GA14974@fujitsu.shahaf.local2> (raw)
In-Reply-To: <CAHAq8pEPk41cxWdqyBLawsbadAt+JUBnv59nZbNLkte8nfX0iw__31688.0478793339$1477597412$gmane$org@mail.gmail.com>

Paulo César Pereira de Andrade wrote on Thu, Oct 27, 2016 at 15:51:43 -0200:
>   A simple reproducer:
> 
> """
> $ cat t.sh
> #!/bin/sh
> echo $HOME
> 
> $ ln -sf /bin/zsh ksh
> 
> $ ./ksh -n t.sh
> Segmentation fault (core dumped)
> """

You're using 5.0.2, which is four years old.  We've fixed this bug in
5.2 last year:

    commit 83a175795a444e8169fcb592a110d4d15a09b907
    Author: Peter Stephenson <pws@zsh.org>
    Date:   Tue Oct 6 09:28:07 2015 +0100
    
        36780: Fix crash in ksh mode with -n and $HOME.
        
        If home variable is NULL ensure HOME is unset.

Current master does not have the problem:

% ARGV0=ksh Src/zsh -fn =(<<<$'#!/bin/sh\necho $HOME\n') 
% 

Thanks for the bug report and the patch.

Cheers,

Daniel


       reply	other threads:[~2016-10-27 20:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAHAq8pEPk41cxWdqyBLawsbadAt+JUBnv59nZbNLkte8nfX0iw__31688.0478793339$1477597412$gmane$org@mail.gmail.com>
2016-10-27 20:19 ` Daniel Shahaf [this message]
2016-10-28 12:04   ` Paulo César Pereira de Andrade
2016-10-27 17:51 Paulo César Pereira de Andrade
2016-10-27 20:27 ` 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=20161027201907.GA14974@fujitsu.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=paulo.cesar.pereira.de.andrade@gmail.com \
    --cc=zsh-users@zsh.org \
    /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).