[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#325600: 325600 (<defunct> threads on Alpha).



Falk Hueffner wrote:

That's weird. What happens with -O0? What with gcc 3.3? Can you
perhaps attach the assembly that is generated for the "broken" case?


This is actually with gcc-3.3 (I started using it by default for these tests).
Haven't tried "-O0" - will attempt that next.

...tom

"broken" case:
0000000000000f00 <pthread_reap_children>:
    f00:       00 00 bb 27     ldah    gp,0(t12)
    f04:       00 00 bd 23     lda     gp,0(gp)
    f08:       d0 ff de 23     lda     sp,-48(sp)
    f0c:       01 00 3f 20     lda     t0,1
    f10:       10 00 5e b5     stq     s1,16(sp)
    f14:       2a f7 23 48     sll     t0,0x1f,s1
    f18:       00 00 5e b7     stq     ra,0(sp)
    f1c:       08 00 3e b5     stq     s0,8(sp)
    f20:       6d 01 1f 20     lda     v0,365
    f24:       ff ff 1f 22     lda     a0,-1
    f28:       20 00 3e 22     lda     a1,32(sp)
    f2c:       01 00 4a 22     lda     a2,1(s1)
    f30:       13 04 ff 47     clr     a3
f34: 83 00 00 00 callsys // return from syscall always 0 (according to strace)
    f38:       09 04 e0 47     mov     v0,s0
f3c: 10 00 60 f6 bne a3,f80 <pthread_reap_children+0x80> f40: 01 00 e9 43 sextl s0,t0
    f44:       10 04 e1 47     mov     t0,a0
    f48:       08 00 20 ec     ble     t0,f6c <pthread_reap_children+0x6c>
    f4c:       96 ff 5f d3     bsr     ra,da8 <pthread_exited+0x8>

I noticed that the syscall that "wait4" in libc calls is __NR_osf_wait4 (#7)
as opposed to __NR_wait4 (#365) - could that make a difference?


"working" case:

0000000000000f00 <pthread_reap_children>:
    f00:       00 00 bb 27     ldah    gp,0(t12)
    f04:       00 00 bd 23     lda     gp,0(gp)
    f08:       d0 ff de 23     lda     sp,-48(sp)
    f0c:       01 00 3f 20     lda     t0,1
    f10:       10 00 5e b5     stq     s1,16(sp)
    f14:       2a f7 23 48     sll     t0,0x1f,s1
    f18:       00 00 5e b7     stq     ra,0(sp)
    f1c:       08 00 3e b5     stq     s0,8(sp)
    f20:       6d 01 1f 20     lda     v0,365
    f24:       ff ff 1f 22     lda     a0,-1
    f28:       20 00 3e 22     lda     a1,32(sp)
    f2c:       01 00 4a 22     lda     a2,1(s1)
    f30:       13 04 ff 47     clr     a3
    f34:       83 00 00 00     callsys
    f38:       09 04 e0 47     mov     v0,s0
    f3c:       10 00 60 f6     bne     a3,f80 <pthread_reap_children+0x80>
    f40:       01 00 e9 43     sextl   s0,t0
    f44:       10 04 e1 47     mov     t0,a0
    f48:       08 00 20 ec     ble     t0,f6c <pthread_reap_children+0x6c>
    f4c:       96 ff 5f d3     bsr     ra,da8 <pthread_exited+0x8>




Reply to: