From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199710261746.TAA07343@blinky.bfr.co.il> Date: Sun, 26 Oct 1997 19:46:31 +0200 From: Harvey J. Stein Subject: A program that consistently crashes linux/axp - more info... In-Reply-To: <199710260937.LAA30669@blinky.bfr.co.il> A little followup on the crash I'm seeing. When instruction stepping in the debugger it fails to happen. Instead, I get an "Instruction fault 0". This occurs the second time the program hits this instruction: 0x120006240 : a6090000 ldq a0,0(s0) The first time the instruction is hit, "info reg" shows: a0 0x12013e164 4833141092 s0 0x120141010 4833153040 and the second time it shows: a0 0x37393237363934 15544011556534580 s0 0x120141014 4833153044 Evidentally the load is occurring off of an 8 byte boundary, which is causing an instruction fault. So, there's probably a bug in either f2c or gcc (for producing this unaligned load), but isn't this also a kernel bug? Shouldn't this cause an unaligned trap instead of this Instruction fault? For reference, here's how gdb disassembles the whole function: Dump of assembler code for function l_write: 0x120006170 : 27bb0014 ldah gp,20(t12) 0x120006174 : 23bd1998 lda gp,6552(gp) 0x120006178 : 23deffc0 lda sp,-64(sp) 0x12000617c : b75e0000 stq ra,0(sp) 0x120006180 : b53e0008 stq s0,8(sp) 0x120006184 : b55e0010 stq s1,16(sp) 0x120006188 : b57e0018 stq s2,24(sp) 0x12000618c : b59e0020 stq s3,32(sp) 0x120006190 : b5be0028 stq s4,40(sp) 0x120006194 : b5de0030 stq s5,48(sp) 0x120006198 : 4610040d mov a0,s4 0x12000619c : 46310409 mov a1,s0 0x1200061a0 : a42d0000 ldq t0,0(s4) 0x1200061a4 : 4652040b mov a2,s2 0x1200061a8 : 4673040e mov a3,s5 0x1200061ac : 43e109a1 cmplt zero,t0,t0 0x1200061b0 : 47ff040c clr s3 0x1200061b4 : e4200043 beq t0,0x1200062c4 0x1200061b8 : 4221140a addq a1,0x8,s1 0x1200061bc : 47ff041f nop 0x1200061c0 : 41c05521 subq s5,0x2,t0 0x1200061c4 : 4821f622 zapnot t0,0xf,t1 0x1200061c8 : 404177a1 cmpule t1,0xb,t0 0x1200061cc : e4200008 beq t0,0x1200061f0 0x1200061d0 : a43d8748 ldq t0,-30904(gp) 0x1200061d4 : 40410441 s4addq t1,t0,t0 0x1200061d8 : a0210000 ldl t0,0(t0) 0x1200061dc : 403d0402 addq t0,gp,t1 0x1200061e0 : 6be2002b jmp zero,(t1),0x120006290 0x1200061e4 : 47ff041f nop 0x1200061e8 : 47ff041f nop 0x1200061ec : 47ff041f nop 0x1200061f0 : a63d8750 ldq a1,-30896(gp) 0x1200061f4 : 47f99410 mov 0xcc,a0 0x1200061f8 : a77d81c8 ldq t12,-32312(gp) 0x1200061fc : 6b5b6b8a jsr ra,(t12),0x120001028 0x120006200 : 27ba0014 ldah gp,20(ra) 0x120006204 : 23bd1908 lda gp,6408(gp) 0x120006208 : 2c290000 ldq_u t0,0(s0) 0x12000620c : 482900c1 extbl t0,s0,t0 0x120006210 : 48271721 sll t0,0x38,t0 0x120006214 : 48271790 sra t0,0x38,a0 0x120006218 : c3e0000a br 0x120006244 0x12000621c : 47ff041f nop 0x120006220 : 4520d101 andnot s0,0x6,t0 0x120006224 : a4210000 ldq t0,0(t0) 0x120006228 : 45203102 andnot s0,0x1,t1 0x12000622c : 482202c1 extwl t0,t1,t0 0x120006230 : 48261721 sll t0,0x30,t0 0x120006234 : 48261790 sra t0,0x30,a0 0x120006238 : c3e00002 br 0x120006244 0x12000623c : 47ff041f nop 0x120006240 : a6090000 ldq a0,0(s0) 0x120006244 : d35ffd8c bsr ra,0x120005878 0x120006248 : c3e00018 br 0x1200062ac 0x12000624c : 47ff041f nop 0x120006250 : 8a090000 lds $f16,0(s0) 0x120006254 : c3e00003 br 0x120006264 0x120006258 : 47ff041f nop 0x12000625c : 47ff041f nop 0x120006260 : 8e090000 ldt $f16,0(s0) 0x120006264 : d35fff38 bsr ra,0x120005f48 0x120006268 : c3e00010 br 0x1200062ac 0x12000626c : 47ff041f nop 0x120006270 : 8a090000 lds $f16,0(s0) 0x120006274 : 8a2afffc lds $f17,-4(s1) 0x120006278 : c3e00003 br 0x120006288 0x12000627c : 47ff041f nop 0x120006280 : 8e090000 ldt $f16,0(s0) 0x120006284 : 8e2a0000 ldt $f17,0(s1) 0x120006288 : d35fff43 bsr ra,0x120005f98 0x12000628c : c3e00007 br 0x1200062ac 0x120006290 : a6090000 ldq a0,0(s0) 0x120006294 : 456b0411 mov s2,a1 0x120006298 : d35ffdab bsr ra,0x120005948 0x12000629c : c3e00003 br 0x1200062ac 0x1200062a0 : 45290410 mov s0,a0 0x1200062a4 : 456b0411 mov s2,a1 0x1200062a8 : d35ffdc1 bsr ra,0x1200059b0 0x1200062ac : a42d0000 ldq t0,0(s4) 0x1200062b0 : 4180300c addl s3,0x1,s3 0x1200062b4 : 414b040a addq s1,s2,s1 0x1200062b8 : 418109a1 cmplt s3,t0,t0 0x1200062bc : 412b0409 addq s0,s2,s0 0x1200062c0 : f43fffbf bne t0,0x1200061c0 0x1200062c4 : 47ff0400 clr v0 0x1200062c8 : a75e0000 ldq ra,0(sp) 0x1200062cc : a53e0008 ldq s0,8(sp) 0x1200062d0 : a55e0010 ldq s1,16(sp) 0x1200062d4 : a57e0018 ldq s2,24(sp) 0x1200062d8 : a59e0020 ldq s3,32(sp) 0x1200062dc : a5be0028 ldq s4,40(sp) 0x1200062e0 : a5de0030 ldq s5,48(sp) 0x1200062e4 : 43c8141e addq sp,0x40,sp 0x1200062e8 : 6bfa8001 ret zero,(ra),0x1 Thanks, -- Harvey J. Stein Berger Financial Research hjstein@bfr.co.il -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com