NetBSD-Bugs archive

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

Re: port-sparc/58120: xeyes dies with bus error/core dump on 10.0



The following reply was made to PR port-sparc/58120; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: port-sparc/58120: xeyes dies with bus error/core dump on 10.0
Date: Sat, 13 Apr 2024 13:42:29 +0200

 I was curious why it doesn't crash on 32bit powerpc and found the
 misalignment happens there too:
 
 (gdb) p  &out->valuators.values[i]
 $7 = (double *) 0xfd6c4894
 (gdb) p i
 $8 = 0
 
 but the code does not trap
 
 (gdb) x/16i $pc-32
    0xfdead988 <XInputWireToCookie+692>: xoris   r8,r8,32768
    0xfdead98c <XInputWireToCookie+696>: stw     r8,92(r1)
    0xfdead990 <XInputWireToCookie+700>: lfd     f0,88(r1)
    0xfdead994 <XInputWireToCookie+704>: fsub    f0,f0,f10
    0xfdead998 <XInputWireToCookie+708>: stfdx   f0,r27,r9
    0xfdead99c <XInputWireToCookie+712>: stw     r10,96(r1)
    0xfdead9a0 <XInputWireToCookie+716>: lwz     r6,4(r31)
    0xfdead9a4 <XInputWireToCookie+720>: lwz     r8,52(r25)
 => 0xfdead9a8 <XInputWireToCookie+724>: stw     r6,100(r1)
    0xfdead9ac <XInputWireToCookie+728>: lfd     f0,96(r1)
    0xfdead9b0 <XInputWireToCookie+732>: lfdx    f9,r8,r9
    0xfdead9b4 <XInputWireToCookie+736>: fsub    f0,f0,f11
    0xfdead9b8 <XInputWireToCookie+740>: fmul    f0,f0,f12
    0xfdead9bc <XInputWireToCookie+744>: fmadd   f0,f0,f12,f9
    0xfdead9c0 <XInputWireToCookie+748>: stfdx   f0,r8,r9
    0xfdead9c4 <XInputWireToCookie+752>: stw     r10,104(r1)
 (gdb) info reg
 r0             0xfdead8f0          4260026608
 r1             0xffffe150          4294959440
 r2             0xfde72008          4259782664
 r3             0xfd6c488c          4251732108
 r4             0x14                20
 r5             0x0                 0
 r6             0x0                 0
 r7             0x1                 1
 r8             0xfd6c4894          4251732116
 r9             0x0                 0
 r10            0x43300000          1127219200
 r11            0xfd9f0c50          4255059024
 r12            0xfda16fc0          4255215552
 r13            0x181e65c           25290332
 r14            0x0                 0
 r15            0xffffe4c0          4294960320
 r16            0x28424442          675431490
 r17            0xffffe4d4          4294960340
 r18            0xffffe4d9          4294960345
 r19            0xffffe4d8          4294960344
 r20            0xffffe358          4294959960
 r21            0x0                 0
 r22            0x10                16
 r23            0xfd7802f0          4252500720
 r24            0x51                81
 r25            0xfd6c4850          4251732048
 r26            0xfd794000          4252581888
 r27            0xfd6c4894          4251732116
 r28            0x28                40
 r29            0x2                 2
 r30            0xfdecb16c          4260147564
 r31            0xfd7802f8          4252500728
 pc             0xfdead9a8          0xfdead9a8 <XInputWireToCookie+724>
 msr            <unavailable>
 cr             0x44224248          1143095880
 lr             0xfdead92c          0xfdead92c <XInputWireToCookie+600>
 ctr            0x2                 2
 xer            0x0                 0
 fpscr          0xfff80000          -524288
 vscr           <unavailable>
 vrsave         <unavailable>
 
 
 On sparc64 the misalignment does not happen because XIRawEvent has a
 proper multiple of 8 size:
 
 (gdb) p &out->valuators.values[i]
 $2 = (double *) 0x404b84c8
 (gdb) p sizeof(XIRawEvent)
 $3 = 96
 
 
 Martin
 


Home | Main Index | Thread Index | Old Index