bash 2.02.1 segfault on SunOS4.1 (compiled with egcs-1.1 prerelease)

Matthias Klose doko@cs.tu-berlin.de
Tue Sep 1 12:22:00 GMT 1998


egcs-1.1 configured with --enable-shared --enable-haifa
egcs-1.1 bootstrapped with BOOT_CFLAGS="-O2 -mcpu=v8"
 $ egcc -v
Reading specs from /usr/gnu/lib/gcc-lib/sparc-sun-sunos4.1.3_U1/egcs-2.91.56/specs
gcc version egcs-2.91.56 19980829 (egcs-1.1 pre-release)

bash information:
Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: sunos4.1.3_U1
Compiler: egcc (egcs 1.1 prerelease)
Compilation CFLAGS:  -DPROGRAM='bash2' -DHOSTTYPE='sparc' -DOSTYPE='sunos4.1.3_U1' -DMACHTYPE='sparc-sun-sunos4.1.3_U1' -DSHELL -DHAVE_CONFIG_H -DSunOS4  -I. -I../bash-2.02.1 -I../bash-2.02.1/lib -O2 -mcpu=v8
uname output: SunOS marmor 4.1.3_U1 7 sun4m
Machine Type: sparc-sun-sunos4.1.3_U1

Bash Version: 2.02
Patch Level: 1
Release Status: release

Description:
	bash crashes on commands 
		set | more # (exit with `q')
		set | cat  # interrupted with ^C
	when compiled with the egcs-1.1 prerelease.

 - This bash version works ok, when compiled with gcc-2.7.2.3
 - This bash version works ok on Solaris 2.6 (compiled with egcs-1.1 prerelease).

$ ./bash2
$ set |more
Segmentation fault
$ gdb ./bash2
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-sunos4.1.3_U1"...
(gdb) r
Starting program: /tmp_amd/sombrero/export/share/src/gnu/bash/bash-sun4/./bash2 
doko@marmor [501] (.../bash/bash-sun4) $ set |more
 
Program received signal SIGSEGV, Segmentation fault.
0xef778344 in _doprnt ()
(gdb) bt
#0  0xef778344 in _doprnt ()
#1  0xef77a67c in fprintf ()
#2  0x1d1fc in notify_of_job_status () at ../bash-2.02.1/jobs.c:2538
#3  0x1bfac in notify_and_cleanup () at ../bash-2.02.1/jobs.c:1837
#4  0x1be10 in wait_for (pid=0) at ../bash-2.02.1/jobs.c:1783
#5  0xfb10 in execute_command_internal (command=0x9f990, asynchronous=0, 
    pipe_in=5, pipe_out=-1, fds_to_close=0xa96d0)
    at ../bash-2.02.1/execute_cmd.c:739
#6  0x10ab8 in execute_pipeline (command=0x9f990, asynchronous=0, pipe_in=5, 
    pipe_out=-1, fds_to_close=0xa96d0) at ../bash-2.02.1/execute_cmd.c:1323
#7  0x10d28 in execute_connection (command=0x9fd10, asynchronous=0, 
    pipe_in=-1, pipe_out=-1, fds_to_close=0xa96d0)
    at ../bash-2.02.1/execute_cmd.c:1435
#8  0xfd74 in execute_command_internal (command=0x9fd10, asynchronous=0, 
    pipe_in=-1, pipe_out=-1, fds_to_close=0xa96d0)
    at ../bash-2.02.1/execute_cmd.c:840
#9  0xf0d8 in execute_command (command=0x9fd10)
    at ../bash-2.02.1/execute_cmd.c:284
#10 0x4870 in reader_loop () at ../bash-2.02.1/eval.c:135
#11 0x2b8c in main (argc=1, argv=0xeffff87c, env=0xeffff884)
    at ../bash-2.02.1/shell.c:595
(gdb) up
#1  0xef77a67c in fprintf ()
(gdb) up
#2  0x1d1fc in notify_of_job_status () at ../bash-2.02.1/jobs.c:2538
2538                          fprintf (stderr, "%s", strsignal (termsig));
(gdb) print termsig
$1 = 116



More information about the Gcc-bugs mailing list