Subject: Bash-1.14.5 crashes in not too uncommon cd command.
To: None <bug-bash@prep.ai.mit.edu, current-users@NetBSD.ORG>
From: None <dgilbert@pci.on.ca>
List: current-users
Date: 09/12/1995 14:52:48
Configuration Information [Automatically generated, do not change]:
Machine: sun4
OS: NetBSD
Compiler: gcc

Compilation CFLAGS: -DHAVE_SETLINEBUF -DHAVE_VFPRINTF -DHAVE_UNISTD_H
-DHAVE_STDLIB_H -DHAVE_LIMITS_H -DHAVE_GETGROUPS -DHAVE_RESOURCE
-DHAVE_SYS_PARAM -DVOID_SIGHANDLER -DOPENDIR_NOT_ROBUST
-DINT_GROUPS_ARRAY -DRLIMTYPE=quad_t -DHAVE_WAIT_H -DHAVE_GETWD
-DHAVE_DUP2 -DHAVE_STRERROR -DHAVE_DIRENT -DHAVE_DIRENT_H
-DHAVE_STRING_H -DHAVE_VARARGS_H -DHAVE_STRCHR -DHAVE_STRCASECMP
-DHAVE_DEV_FD -Dsun4 -DNetBSD -DSHELL -DHAVE_ALLOCA -O -g

uname output: NetBSD sol 1.0A NetBSD 1.0A (GENERIC) #1: Wed Aug 30 18:10:57 PDT1995     thorpej@bamboo:/tmp_mnt/antie/work/netbsd/src/sys/arch/sparc/compile/GENERIC sparc

Bash Version: 1.14
Patch Level: 5

Description:
	A core dump with the following backtrace is produced by internal-cd

Program terminated with signal 10, Bus error.
#0  0x5d168 in _catclose ()
(gdb) bt
#0  0x5d168 in _catclose ()
#1  0x5cc00 in _catopen ()
#2  0x5c640 in __strerror ()
#3  0x58d50 in strerror ()
#4  0x15828 in file_error (filename=0xb558c "../usr/local/gnu") at error.c:68
#5  0x326c8 in cd_builtin (list=0xc232c) at ./builtins/cd.def:176
#6  0x1062c in execute_builtin (builtin=0x32464 <cd_builtin>, words=0xc214c, 
    flags=0, subshell=0) at execute_cmd.c:1879
#7  0x10b40 in execute_builtin_or_function (words=0xc214c, 
    builtin=0x32464 <cd_builtin>, var=0x0, redirects=0x0, 
    fds_to_close=0xc1fcc, flags=0) at execute_cmd.c:2106
#8  0x103f0 in execute_simple_command (simple_command=0xbf26c, pipe_in=-1, 
    pipe_out=-1, async=0, fds_to_close=0xc1fcc) at execute_cmd.c:1769
#9  0xe6cc in execute_command_internal (command=0xb6f8c, asynchronous=0, 
    pipe_in=-1, pipe_out=-1, fds_to_close=0xc1fcc) at execute_cmd.c:644
#10 0xdd3c in execute_command (command=0xb6f8c) at execute_cmd.c:200
#11 0x3774 in reader_loop () at ./shell.c:1125
#12 0x2ff4 in main (argc=1, argv=0xf7fffcd4, env=0xf7fffcdc) at ./shell.c:798


Repeat-By:
	When sitting in /mnt/aton/img/dgilbert/export/root/u/dgilbert,
I type 'cd ../../usr/gnu'.  /mnt/aton/img is the NFS mount.  I have
caused this core dump other ways.

	I have the corefile if anyone wants to attack it.

Dave.

-- 
----------------------------------------------------------------------------
|David Gilbert, PCI, Richmond Hill, Ontario.  | Two things can only be     |
|Mail:      dgilbert@pci.on.ca                |  equal if and only if they |
|http://www.pci.on.ca/~dgilbert               |   are precisely opposite.  |
---------------------------------------------------------GLO----------------