why vxworks register r3 is falsified before execution?


I am going to run an application on a PowerC platform(vxworks), but I have encountered a problem. I've got a data access exception. register r3 is falsified before execution,

I don't know why, please help me with this question, thanks!

0x7ff7150 (tTask4_nor): Watchdog for T0 stopped 0x7ff7150
(tTask4_nor): CPU exception! Vector: 0x300 Task: 0 MSR: 0x2029230 CR:0x48000882
data storage Exception current instruction address: 0x07852fb4 Machine Status Register: 0x02029230
Data Exception Address Register: 0xdc7a557c
Condition Register: 0x48000882
Exception Syndrome Register: 0x00800000
Task: 0x7ff7150 "tTask4_nor" 0x8131870 (ExcRecord):
exeExcRecord running now! 0x8131870 (ExcRecord): exeExcRecord have been done!
0x7ff7150 (tTask4_nor): task 0x7ff7150 has had a failure and has been stopped.
0x7ff7150 (tTask4_nor): The task has been terminated because it triggered an exception that raised the signal 11.


r0    = 0x05bfd934    sp    = 0x07ff7058   r2    = 0x004b93f0
r3    = 0xdc7a557c   r4    = 0x05bfd941   r5    = 0x00000000
r6    = 0x00000000   r7    = 0x00000000   r8    = 0x00000000
r9    = 0x05de550c   r10    = 0x00000001   r11    = 0x05bfd900
r12    = 0x00000708   r13    = 0x00536930   r14    = 0x00000000
r15    = 0x00000000   r16    = 0x004c2198   r17    = 0x004eac48
r18    = 0x004ea988   r19    = 0x004ea98c   r20    = 0x004ea990
r21    = 0x004ea994   r22    = 0x004ea998   r23    = 0x00000002
r24    = 0x004eabd8   r25    = 0x004eaa48   r26    = 0x004eaf94
r27    = 0x00000000   r28    = 0x004f0000   r29    = 0x05de550c
r30    = 0x005812a4   r31    = 0x00582b40   msr    = 0x02029230
lr    = 0x001df25c   ctr    = 0x001ea654   pc    = 0x07852fb4
cr    = 0x48000882   xer    = 0x00000000   pgTblPtr   = 0xeeeeeeee
asid    = 0x00000001   spefscr    = 0x00200000


 0x7852f94  98640000    stb         r3,0(r4)
 0x7852f98  7c0802a6    mfspr       r0,LR
 0x7852f9c  9421fff8    stwu        r1,-8(r1)
 0x7852fa0  9001000c    stw         r0,12(r1)
 0x7852fa4  3c6005de    lis         r3,0x5de # 1502
 0x7852fa8  6063557c    ori         r3,r3,0x557c
 0x7852fac  3c0005bf    lis         r0,0x5bf # 1471
 0x7852fb0  6000d934    ori         r0,r0,0xd934
*0x7852fb4  90030000    stw         r0,0(r3)
 0x7852fb8  3c000015    lis         r0,0x15 # 21
 0x7852fbc  600088b4    ori         r0,r0,0x88b4
 0x7852fc0  7c0803a6    mtspr       LR,r0
 0x7852fc4  4e800021    blrl        
 0x7852fc8  8001000c    lwz         r0,12(r1)
 0x7852fcc  7c0803a6    mtspr       LR,r0
 0x7852fd0  38210008    addi        r1,r1,0x8 # 8

enter image description here

asked on Stack Overflow Dec 10, 2018 by yuhai3155 • edited Dec 10, 2018 by Ishita Shah

1 Answer

pc    = 0x07852fb4,

so the code is:

stw         r0,0(r3).

I think ,r3 is out of range

(r3 = 0xdc7a557c )

answered on Stack Overflow Jan 22, 2021 by jasonli • edited Jan 22, 2021 by Tomer Shetah

User contributions licensed under CC BY-SA 3.0