🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #515

bash 1.02 seg-faults on ^D

#515
From: Brian Fox
Date: Tue, 29 Aug 1989 19:33
49 lines
2608 bytes
   From: George Young <young@vlsi.ll.mit.edu>
   Date: Tue, 29 Aug 89 13:15:49 EDT

   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: <8908291933.AA29754@aurel.caltech.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfox
References: <8908291715.AA12548@rose.vlsi.ll.mit.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!AUREL.CALTECH.EDU!bfox
From: bfox@AUREL.CALTECH.EDU (Brian Fox)
Newsgroups: gnu.bash.bug
Subject: bash 1.02 seg-faults on ^D
Message-ID: <8908291933.AA29754@aurel.caltech.edu>
Date: 29 Aug 89 19:33:59 GMT
References: <8908291715.AA12548@rose.vlsi.ll.mit.edu>
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: bfox@aurel.caltech.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 49