Subject: Re: ksh lossage on sparc64
To: None <tech-toolchain@netbsd.org>
From: Charles M. Hannum <root@ihack.net>
List: tech-toolchain
Date: 11/22/2000 20:16:53
The following test program appears to lose the same way, but only
intermittantly. I.e., it usually works, but once in a while it core
dumps.
If you run it like:
$ (while :; do ./foo >/dev/null; done)
you'll see something like:
...
pid 27452 (foo), uid 149: exited on signal 11 (core dumped)
Alignment error: dsfsr=00000000:00800001 dsfar=0:7 isfsr=00000000:00000000 pc=0x10206e40
pid 27755 (foo), uid 149: exited on signal 10 (core dumped)
pid 28220 (foo), uid 149: exited on signal 11 (core dumped)
Alignment error: dsfsr=00000000:00800005 dsfar=0:1020581c isfsr=00000000:00000000 pc=0x10206da8
pid 28232 (foo), uid 149: exited on signal 10 (core dumped)
Alignment error: dsfsr=00000000:00800005 dsfar=0:1020581c isfsr=00000000:00000000 pc=0x10206da8
pid 28361 (foo), uid 149: exited on signal 10 (core dumped)
Alignment error: dsfsr=00000000:00800005 dsfar=0:1020581c isfsr=00000000:00000000 pc=0x10206da8
pid 28370 (foo), uid 149: exited on signal 10 (core dumped)
...
on the console.
-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----
.text
.global sig
sig:
retl
nop
.global main
main:
save %sp, -128, %sp
mov 20, %o0
sethi %hi(sig), %o1
or %o1, %lo(sig), %o1
call signal
nop
save %sp, -128, %sp
mov 2, %i0
mov 3, %i1
mov 5, %i2
mov 7, %i3
mov 11, %i4
mov 13, %i5
save %sp, -128, %sp
mov 17, %i0
mov 19, %i1
mov 23, %i2
mov 29, %i3
mov 31, %i4
mov 37, %i5
save %sp, -128, %sp
mov 41, %i0
mov 43, %i1
mov 47, %i2
mov 53, %i3
mov 59, %i4
mov 61, %i5
save %sp, -128, %sp
mov 67, %i0
mov 71, %i1
mov 73, %i2
mov 79, %i3
mov 83, %i4
mov 97, %i5
save %sp, -128, %sp
mov 101, %i0
mov 103, %i1
mov 107, %i2
mov 109, %i3
mov 113, %i4
mov 127, %i5
save %sp, -128, %sp
mov 131, %i0
mov 137, %i1
mov 139, %i2
mov 149, %i3
mov 151, %i4
mov 157, %i5
save %sp, -128, %sp
mov 163, %i0
mov 167, %i1
mov 173, %i2
mov 179, %i3
mov 181, %i4
mov 191, %i5
save %sp, -128, %sp
mov 193, %i0
mov 197, %i1
mov 199, %i2
mov 211, %i3
mov 223, %i4
mov 227, %i5
call fork
nop
cmp %o0, 0
be 1f
nop
call fork
nop
cmp %o0, 0
be 1f
nop
sethi %hi(output), %g1
or %g1, %lo(output), %g1
stx %i0, [%g1 + 8*6*7 + 8*0]
stx %i1, [%g1 + 8*6*7 + 8*1]
stx %i2, [%g1 + 8*6*7 + 8*2]
stx %i3, [%g1 + 8*6*7 + 8*3]
stx %i4, [%g1 + 8*6*7 + 8*4]
stx %i5, [%g1 + 8*6*7 + 8*5]
restore
stx %i0, [%g1 + 8*6*6 + 8*0]
stx %i1, [%g1 + 8*6*6 + 8*1]
stx %i2, [%g1 + 8*6*6 + 8*2]
stx %i3, [%g1 + 8*6*6 + 8*3]
stx %i4, [%g1 + 8*6*6 + 8*4]
stx %i5, [%g1 + 8*6*6 + 8*5]
restore
stx %i0, [%g1 + 8*6*5 + 8*0]
stx %i1, [%g1 + 8*6*5 + 8*1]
stx %i2, [%g1 + 8*6*5 + 8*2]
stx %i3, [%g1 + 8*6*5 + 8*3]
stx %i4, [%g1 + 8*6*5 + 8*4]
stx %i5, [%g1 + 8*6*5 + 8*5]
restore
stx %i0, [%g1 + 8*6*4 + 8*0]
stx %i1, [%g1 + 8*6*4 + 8*1]
stx %i2, [%g1 + 8*6*4 + 8*2]
stx %i3, [%g1 + 8*6*4 + 8*3]
stx %i4, [%g1 + 8*6*4 + 8*4]
stx %i5, [%g1 + 8*6*4 + 8*5]
restore
stx %i0, [%g1 + 8*6*3 + 8*0]
stx %i1, [%g1 + 8*6*3 + 8*1]
stx %i2, [%g1 + 8*6*3 + 8*2]
stx %i3, [%g1 + 8*6*3 + 8*3]
stx %i4, [%g1 + 8*6*3 + 8*4]
stx %i5, [%g1 + 8*6*3 + 8*5]
restore
stx %i0, [%g1 + 8*6*2 + 8*0]
stx %i1, [%g1 + 8*6*2 + 8*1]
stx %i2, [%g1 + 8*6*2 + 8*2]
stx %i3, [%g1 + 8*6*2 + 8*3]
stx %i4, [%g1 + 8*6*2 + 8*4]
stx %i5, [%g1 + 8*6*2 + 8*5]
restore
stx %i0, [%g1 + 8*6*1 + 8*0]
stx %i1, [%g1 + 8*6*1 + 8*1]
stx %i2, [%g1 + 8*6*1 + 8*2]
stx %i3, [%g1 + 8*6*1 + 8*3]
stx %i4, [%g1 + 8*6*1 + 8*4]
stx %i5, [%g1 + 8*6*1 + 8*5]
restore
stx %i0, [%g1 + 8*6*0 + 8*0]
stx %i1, [%g1 + 8*6*0 + 8*1]
stx %i2, [%g1 + 8*6*0 + 8*2]
stx %i3, [%g1 + 8*6*0 + 8*3]
stx %i4, [%g1 + 8*6*0 + 8*4]
stx %i5, [%g1 + 8*6*0 + 8*5]
restore
mov 1, %o0
sethi %hi(output), %o1
or %o1, %lo(output), %o1
mov 8*6*8, %o2
call write
nop
1:
mov 0, %o0
call _exit
nop
.data
.global output
output:
.space 8*6*8
-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----snip-----8<-----