Thread View: gnu.bash.bug
2 messages
2 total messages
Started by Andy Wai
Mon, 10 Jul 1989 02:30
bash 1.02 core dumps on control-D
Author: Andy Wai
Date: Mon, 10 Jul 1989 02:30
Date: Mon, 10 Jul 1989 02:30
26 lines
1120 bytes
1120 bytes
Script started on Sun Jul 9 21:45:32 1989 watmsg[1]% /usr/local/bin/bash watmsg[1]$ ^D Segmentation fault /usr/local/bin/bash (core dumped) watmsg[2]% exit script done on Sun Jul 9 21:45:55 1989 The machine is a Vax running 4.3 BSD. This seems to happen regardless of the values of variables and environments. One more comment: the Makefile for version 1.02 is much less portable than the previous one. For example, some versions of make don't understand the following: %.o : %.c ^^^^^^^^^ $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ It also assumes the existence of variables like MAKE and RM which is not defined in some versions of make. Thanks. Andy Wai
Re: bash 1.02 core dumps on control-D
Author: Chet Ramey
Date: Mon, 10 Jul 1989 13:50
Date: Mon, 10 Jul 1989 13:50
65 lines
2543 bytes
2543 bytes
In article <8907100230.AA22676@watmath.waterloo.edu> accwai@WATMATH.WATERLOO.EDU (Andy Wai) writes:
>
> Script started on Sun Jul 9 21:45:32 1989
> watmsg[1]% /usr/local/bin/bash
> watmsg[1]$ ^D
> Segmentation fault /usr/local/bin/bash (core dumped)
> watmsg[2]% exit
>
Brian took out the checks for current_readline_line[0] == EOF, and tries to
dereference it (parse.y: yy_readline_get). Patch below. Once again, this
may not be the Officially Blessed patch (there has to be a better way to do
this, but this works).
> %.o : %.c
> ^^^^^^^^^
> $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
>
>It also assumes the existence of variables like MAKE and RM which is
>not defined in some versions of make.
>
There is no excuse for not using Gnu Make, which has all of these features.
The rule in question is basically equivalent to:
.c.o:
$(CC) -c $(CFLAGS) $(CPPFLAGS) $*.c
*** bash-1.02/parse.y Sat Jul 1 21:42:28 1989
--- src-1.02/parse.y Fri Jul 7 14:31:03 1989
***************
*** 431,438
current_readline_line_index = 0;
! current_readline_line =
! (char *)xrealloc (current_readline_line,
! 2 + strlen (current_readline_line));
! strcat (current_readline_line, "\n");
}
--- 431,447 -----
current_readline_line_index = 0;
! if ((long)current_readline_line != (long)EOF) {
! current_readline_line =
! (char *)xrealloc (current_readline_line,
! 2 + strlen (current_readline_line));
! strcat (current_readline_line, "\n");
! }
! }
!
! if ((long) current_readline_line == (long) EOF)
! {
! current_readline_line = (char *) NULL;
! current_readline_line_index = 0;
! return (EOF);
}
Chet Ramey "We are preparing to think about contemplating
Network Services Group, CWRU preliminary work on plans to develop a
chet@cwjcc.INS.CWRU.Edu schedule for producing the 10th Edition of
the Unix Programmers Manual." -- Andrew Hume
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads