Subject: bin/33281: /bin/sh cores on certain inputs
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <mjl@emsi.priv.at>
List: netbsd-bugs
Date: 04/18/2006 10:20:02
>Number:         33281
>Category:       bin
>Synopsis:       /bin/sh cores on certain inputs
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 18 10:20:02 +0000 2006
>Originator:     Martin J. Laubach
>Release:        NetBSD 3.0_STABLE
>Organization:
>Environment:
System: NetBSD asparagus.emsi.priv.at 3.0_STABLE NetBSD 3.0_STABLE (ASPARAGUS) #8: Sat Apr 8 23:54:07 CEST 2006 mjl@asparagus.emsi.priv.at:/home/users/mjl/netbsd/cvs/src/sys30/arch/i386/compile/ASPARAGUS i386
Architecture: i386
Machine: i386
>Description:

  Consider the following (ill-formed) script:

--- cut ---
#!/bin/sh

echo "abc" | \
	{ \
	}
--- cut ---

  Trying to run it yields:

	$ sh x.sh
	[1]   Segmentation fault (core dumped) sh x.sh

  The backtrace is as follows:

(gdb) bt
#0  0x0804cd22 in prehash ()
#1  0x0804bb9b in evalpipe ()
#2  0x0804b5d2 in evaltree ()
#3  0x08054642 in cmdloop ()
#4  0x080543b3 in main ()
#5  0x08049da6 in ___start ()

>How-To-Repeat:
>Fix: