NetBSD Problem Report #52272

From brad.harder@gmail.com  Sun Jun  4 22:32:14 2017
Return-Path: <brad.harder@gmail.com>
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 675857A1B7
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  4 Jun 2017 22:32:14 +0000 (UTC)
Message-Id: <CABfrOT98ZJdgwGwgFPozPPiCW7wER3EUL0a0-5grLbd=pcp4Cg@mail.gmail.com>
Date: Sun, 4 Jun 2017 15:32:11 -0700
From: bch <brad.harder@gmail.com>
Reply-To:
To: gnats-bugs@netbsd.org
Subject: /bin/sh tilde expansion is broken

>Number:         52272
>Category:       bin
>Synopsis:       "~" expansion in /bin/sh
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kre
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 04 22:35:00 +0000 2017
>Closed-Date:    Mon Jun 05 09:47:29 +0000 2017
>Last-Modified:  Mon Jun 05 09:47:29 +0000 2017
>Originator:     bch <brad.harder@gmail.com>
>Release:        NetBSD 8.99.1
>Organization:
	method logic digital
>Environment:
System: NetBSD kamloops 8.99.1 NetBSD 8.99.1 (GENERIC) #133: Sun Jun 4
13:17:45 PDT 2017
root@kamloops:/usr/src/sys/arch/amd64/compile/obj/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	"~" expansion isn't working in /bin/sh.

kamloops$ ls -ld ~
ls: ~: No such file or directory
kamloops$

>How-To-Repeat:
	$ ls -ld ~
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: bin-bug-people->kre
Responsible-Changed-By: kre@NetBSD.org
Responsible-Changed-When: Sun, 04 Jun 2017 23:25:14 +0000
Responsible-Changed-Why:
I am looking into this PR


State-Changed-From-To: open->feedback
State-Changed-By: kre@NetBSD.org
State-Changed-When: Sun, 04 Jun 2017 23:42:52 +0000
State-Changed-Why:
I think this should be fixed in src/bin/sh/expand.c 1.111
Can you test and confirm?


From: "Robert Elz" <kre@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52272 CVS commit: src/bin/sh
Date: Sun, 4 Jun 2017 23:40:31 +0000

 Module Name:	src
 Committed By:	kre
 Date:		Sun Jun  4 23:40:31 UTC 2017

 Modified Files:
 	src/bin/sh: expand.c

 Log Message:
 PR bin/52272 - fix an off-by one that broke ~ expansions.


 To generate a diff of this commit:
 cvs rdiff -u -r1.110 -r1.111 src/bin/sh/expand.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: bch <brad.harder@gmail.com>
To: gnats-bugs@netbsd.org
Cc: kre@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: PR/52272 CVS commit: src/bin/sh
Date: Sun, 4 Jun 2017 20:51:30 -0700

 This appears to fix the error I reported. Thx!

 -bch


 On 6/4/17, Robert Elz <kre@netbsd.org> wrote:
 > The following reply was made to PR bin/52272; it has been noted by GNATS.
 >
 > From: "Robert Elz" <kre@netbsd.org>
 > To: gnats-bugs@gnats.NetBSD.org
 > Cc:
 > Subject: PR/52272 CVS commit: src/bin/sh
 > Date: Sun, 4 Jun 2017 23:40:31 +0000
 >
 >  Module Name:	src
 >  Committed By:	kre
 >  Date:		Sun Jun  4 23:40:31 UTC 2017
 >
 >  Modified Files:
 >  	src/bin/sh: expand.c
 >
 >  Log Message:
 >  PR bin/52272 - fix an off-by one that broke ~ expansions.
 >
 >
 >  To generate a diff of this commit:
 >  cvs rdiff -u -r1.110 -r1.111 src/bin/sh/expand.c
 >
 >  Please note that diffs are not public domain; they are subject to the
 >  copyright notices on the relevant files.
 >
 >

State-Changed-From-To: feedback->pending-pullups
State-Changed-By: kre@NetBSD.org
State-Changed-When: Mon, 05 Jun 2017 04:02:40 +0000
State-Changed-Why:
Pullups to netbsd-8 requested, #7


From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52272 CVS commit: [netbsd-8] src/bin/sh
Date: Mon, 5 Jun 2017 08:15:16 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Mon Jun  5 08:15:16 UTC 2017

 Modified Files:
 	src/bin/sh [netbsd-8]: expand.c

 Log Message:
 Pull up following revision(s) (requested by kre in ticket #7):
 	bin/sh/expand.c: revisions 1.111, 1.112
 PR bin/52272 - fix an off-by one that broke ~ expansions.
 --
 Another arithmetic expansion recordregion() fix, this time
 calculate the lenght (used to calculate the end) based upon the
 correct starting point.
 Thanks to John Klos for finding and reporting this one.


 To generate a diff of this commit:
 cvs rdiff -u -r1.110 -r1.110.2.1 src/bin/sh/expand.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: kre@NetBSD.org
State-Changed-When: Mon, 05 Jun 2017 09:47:29 +0000
State-Changed-Why:
Pullups completed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.