Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: $HOME not set and zsh crashing in emulation mode
- X-seq: zsh-users 22039
 
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
 
- To: Paulo César Pereira de Andrade <paulo.cesar.pereira.de.andrade@xxxxxxxxx>
 
- Subject: Re: $HOME not set and zsh crashing in emulation mode
 
- Date: Thu, 27 Oct 2016 20:19:07 +0000
 
- Cc: zsh-users@xxxxxxx
 
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=	daniel.shahaf.name; h=cc:content-transfer-encoding:content-type	:date:from:in-reply-to:message-id:mime-version:references	:subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=	mesmtp; bh=YcnvwV2ixIJZDeAn30qJuYmeD0g=; b=tNFXmsPLI+5FBShBkcO4R	phmMp8UgIA4bTW8gh5Chd4teRF2DAgaxNmAL0Zu0Asym6u0/r8UnRX3UpwtaVX91	U1Wt9sHOFP1bdnPjN7vVkloAXx7BQOiFiE9SNNAIZLGPkYOJIgmaRaqq9idEcVmn	CXK97zvhpgRCf6pVPNaiLU=
 
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=	messagingengine.com; h=cc:content-transfer-encoding:content-type	:date:from:in-reply-to:message-id:mime-version:references	:subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=	smtpout; bh=YcnvwV2ixIJZDeAn30qJuYmeD0g=; b=hArZCI+uTC0oZu6mXUKE	cTaod/ZbeDLpqNxqNqA7uKiyluuoFoQRdx89zWJqwLMe9frn+OOvkDWMIzJj4adY	hNLIjVcEDsz7bGCKFhqK2+EyijQqNzqq9KapYKkuqUZuBnHvSj6JdFSVC2v87wGy	c55CiqFJfK6G4P9MO3E6meo=
 
- In-reply-to: <CAHAq8pEPk41cxWdqyBLawsbadAt+JUBnv59nZbNLkte8nfX0iw__31688.0478793339$1477597412$gmane$org@mail.gmail.com>
 
- List-help: <mailto:zsh-users-help@zsh.org>
 
- List-id: Zsh Users List <zsh-users.zsh.org>
 
- List-post: <mailto:zsh-users@zsh.org>
 
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
 
- References: <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@xxxxxxx>
    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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author