Subject: NetBSD - Nov 20: Seg Fault in sed(1)
To: None <>
From: Simon J. Gerraty <>
List: current-users
Date: 12/01/1993 23:00:25
Since updating to Nov 20 NetBSD, sed(1) gets a segmentation fault when
running /usr/share/man/makewhatis.sed

Running under the debugger shows that one branch of the compiled
"prog" is not completely setup:

(gdb) where
#0  applies (cp=(struct s_command *) 0x19040) (/usr/src/usr.bin/sed/process.c line 276)
#1  0x353a in process () (/usr/src/usr.bin/sed/process.c line 102)
#2  0x2deb in main (argc=5, argv=(char **) 0xfdbfdc44) (/usr/src/usr.bin/sed/main.c line 153)
(gdb) p *cp
$27 = {next = 0x19140, a1 = 0x10000028, a2 = 0x58000004, t = 0x48000002 <Address 0x48000002 out of bounds>, u = {c = 0x28000000, s = 0x28000000, y = 0x28000000 <Address 0x28000000 out of bounds>, fd = 671088640}, code = 125, nonsel = 0x00000000, inrange = 0x00000000}
(gdb) c

Program received signal 11, Segmentation fault
0x3b87 in applies (cp=(struct s_command *) 0x19040) (/usr/src/usr.bin/sed/process.c line 286)

The "prog" starts at 0x19000 so 0x19040 is one of the first branches.
The prog executes happily starting at 0x19000 branching to 0x19060 (I
think) running for a bit, then back to 0x19000 and then takes the
0x19040 branch which kills it...

Anyone found and fixed the problem?