🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #514

bash 1.02 seg-faults on ^D

#514
From: George Young
Date: Tue, 29 Aug 1989 17:15
45 lines
2317 bytes
This is a bug report for bash version 1.02 .  Environment:
TARGET:	SUN3	(sun 3/50, 12 Mbyte diskless)
OS:	SUNOS3	(actually 3.5)
BISON:	bison
CC:	gcc -traditional -O -g

Make ran without problems.  'bash' runs fine except:
	When I type a ^D alone on a line, bash crashes with a segmentation
	violation.  (If I exit bash with "exit" everthing's fine).
gdb trace looks like:

Program received signal 11, Segmentation fault
0x2c390 in strlen ()
(gdb) where
#0  0x2c390 in strlen ()
#1  0x451e in shell_getc () (parse.y line 393)
#2  0x497e in read_token (command=0) (parse.y line 1027)
#3  0x485a in yylex () (parse.y line 961)
#4  0x34f6 in yyparse () (bison.simple line 214)
#5  0x2974 in read_command () (shell.c line 634)
#6  0x2852 in reader_loop () (shell.c line 574)
#7  0x26a0 in main (argc=1, argv=(char **) 0xefffcf8, env=(char **) 0xefffd00) (shell.c line 465)

This seems to be happening at line 434 of parse.y, when the
'current_readline_line' arg to strlen has a bogus (-1 I think) value.
The bug is quite repeatable.

..............................................................................
			Unrelated bash comments:
It would be helpful to have an 'autologout' timer,
set by some variable.  I know this is only effective if one is sitting at
a shell prompt, but lots of people leave a terminal sitting at a shell prompt
for days (or weeks!).

Documentation:  a full reference manual would be nice, when you have time, but
in the mean time a heavily commented '.bashrc' file with lots of goodies would
be very helpful, especially for users of '[t]csh' (like me) who would like to
convert to bash.

In general, this is a nifty shell; I have adopted it as my preferred shell on
all our machines.
George Young,  Rm. B-141		young@vlsi.ll.mit.edu
MIT Lincoln Laboratory			young@ll-vlsi.arpa
244 Wood St.				[129.55.11.7]
Lexington, Massachusetts  02173		(617) 981-2756
Technical Details
Message-ID: <8908291715.AA12548@rose.vlsi.ll.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!VLSI.LL.MIT.EDU!young

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!VLSI.LL.MIT.EDU!young
From: young@VLSI.LL.MIT.EDU (George Young)
Newsgroups: gnu.bash.bug
Subject: bash 1.02 seg-faults on ^D
Message-ID: <8908291715.AA12548@rose.vlsi.ll.mit.edu>
Date: 29 Aug 89 17:15:49 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 45