NetBSD Problem Report #52172
From www@NetBSD.org Mon Apr 17 11:38:53 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 41C157A1F5
for <gnats-bugs@gnats.NetBSD.org>; Mon, 17 Apr 2017 11:38:53 +0000 (UTC)
Message-Id: <20170417113852.209757A2BC@mollari.NetBSD.org>
Date: Mon, 17 Apr 2017 11:38:52 +0000 (UTC)
From: nis7999@gmail.com
Reply-To: nis7999@gmail.com
To: gnats-bugs@NetBSD.org
Subject: /bin/ksh crashes on re-executing an alias that adds environment
X-Send-Pr-Version: www-1.0
>Number: 52172
>Category: bin
>Synopsis: /bin/ksh crashes on re-executing an alias that adds environment
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Apr 17 11:40:00 +0000 2017
>Originator: Shingo Nishioka
>Release: NetBSD 7.1_STABLE
>Organization:
>Environment:
amd64
>Description:
As alias expansion stops if command is alias word itself,
an alias can be used to add environment variable to a simple command.
Re-execute such alias causes /bin/ksh to crash.
workaround:
add trailing space to aliased command.
For example:
alias ls='LANG=C ls '
Other implementation:
bash, mksh, ksh93, and zsh are not affected this problem.
>How-To-Repeat:
$ /bin/ksh
$ alias ls='LANG=C ls'
$ ls
$ fc -e -
>Fix:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.