From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19247 invoked by alias); 27 Oct 2016 20:31:13 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22039 Received: (qmail 21157 invoked from network); 27 Oct 2016 20:31:13 -0000 X-Qmail-Scanner-Diagnostics: from out5-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.29):SA:0(0.0/5.0):. Processed in 0.408106 secs); 27 Oct 2016 20:31:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) 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= X-ME-Sender: X-Sasl-enc: 0WPqS5gQVl+ydDrEFOX+RZOHY1PFd9M5OOcfRPToJdhR 1477599668 Date: Thu, 27 Oct 2016 20:19:07 +0000 From: Daniel Shahaf To: Paulo =?utf-8?B?Q8Opc2Fy?= Pereira de Andrade Cc: zsh-users@zsh.org Subject: Re: $HOME not set and zsh crashing in emulation mode Message-ID: <20161027201907.GA14974@fujitsu.shahaf.local2> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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 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