Subject: bin/24298: sh dumps core while editing long line
To: None <gnats-bugs@gnats.netbsd.org>
From: SAITOH Masanobu <masanobu@iij.ad.jp>
List: netbsd-bugs
Date: 02/02/2004 18:03:40
>Number:         24298
>Category:       bin
>Synopsis:       sh dumps core while editing long line
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 02 09:04:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     SAITOH Masanobu
>Release:        NetBSD 1.6.1_STABLE
>Organization:
SAITOH Masanobu (masanobu@iij.ad.jp)
>Environment:
System: NetBSD sys24.iij.ad.jp 1.6.1_STABLE NetBSD 1.6.1_STABLE (SYS24) #1: Fri Sep 26 19:31:53 JST 2003 masanobu@sys24.iij.ad.jp:/var/sources/netbsd-1-6/src/sys/arch/i386/compile/SYS24 i386
Architecture: i386
Machine: i386
>Description:
	See How-To-Repeat section.


>How-To-Repeat:
	% /bin/sh		(run /bin/sh)
	$ set -E		(set emacs mode)
	$ echo '
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> 01234567890123456789012345678901234567890123456789
	> '			(enter long line (more than 1024 bytes))
	01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789
        01234567890123456789012345678901234567890123456789 (echoback)
	$ (enter CTRL-P)
	$ echo '01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456
			(truncated to 1024 bytes)
	$ echo '01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890
			(delete some bytes)

	$ echo '01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	01234567890123456789012345678901234567890123456789
	0123456789012345678901234567890123456789001234567890123456789012345678901234567890123456789<CR>
			(add some bytes to oveflow 1024 bytes and press RETURN)
	Segmentation fault (core dumped)

>Fix:
	I don't know
>Release-Note:
>Audit-Trail:
>Unformatted: