anjiahao1 commented on issue #14487:
URL: https://github.com/apache/nuttx/issues/14487#issuecomment-2447300545

   hello @tmedicci 
   I used gdbserver. py to analyze and found that the files in the backtrace of 
the crash are inconsistent with the main thread? Are you using the latest code?
   The reason for the crash should be that the buffer was copied incorrectly 
during memcpy
   
   
   
   step
   save 
   
   ```
   up_dump_register:    PC: 40056fa1    PS: 00060730
   up_dump_register:    A0: 8203fcae    A1: 3fc96e50    A2: 40387c50    A3: 
3c0212de
   up_dump_register:    A4: 000000ab    A5: 40387cf8    A6: 00001d00    A7: 
08e0ffe0
   up_dump_register:    A8: 00000000    A9: 00019c00   A10: 00000000   A11: 
3fc96e10
   up_dump_register:   A12: 00060520   A13: 00060520   A14: 00000040   A15: 
00000000
   up_dump_register:   SAR: 00000020 CAUSE: 00000003 VADDR: 40387cf8
   up_dump_register:  LBEG: 40056f5c  LEND: 40056f72  LCNT: 00000000
   dump_stackinfo: User Stack:
   dump_stackinfo:   base: 0x3fc96990
   dump_stackinfo:   size: 00002000
   dump_stackinfo:     sp: 0x3fc96e50
   stack_dump: 0x3fc96e30: 00000000 00000000 00000000 00000000 8203e6fa 
3fc96e60 00000000 40387c50
   stack_dump: 0x3fc96e50: 8203e71e 3fc96e90 fffffff7 40387c50 00000000 
3fc971ac 000000ab 00000024
   stack_dump: 0x3fc96e70: 000000ab 3fc971a0 3fc968a0 3fc97748 8203e73c 
3fc96eb0 00000000 40387c50
   stack_dump: 0x3fc96e90: 000000ab fffffffc 3fc971ac 3fc971ac 82045a31 
3fc96ee0 00000003 40387c50
   stack_dump: 0x3fc96eb0: 3fc968a0 3fc96ee0 3fc96f60 3fc97770 000000ab 
00000008 3fc97748 00000000
   stack_dump: 0x3fc96ed0: 820458ec 3fc96f00 3fc96f60 40387c50 000000ab 
00000008 00000000 3fc96548
   stack_dump: 0x3fc96ef0: 82042466 3fc96f20 3fc96f60 40387c50 000000ab 
40387c50 000000ab 00000009
   stack_dump: 0x3fc96f10: 82048046 3fc96f60 3fc976c0 00000000 3fc97d00 
40387c50 00000000 00000000
   stack_dump: 0x3fc96f30: 00000000 00000000 00000200 00000015 00000001 
3fc96f24 3fc97798 00000001
   stack_dump: 0x3fc96f50: 82047eee 3fc97020 3fc976c0 3fc8af8c 40387c50 
3fc97d00 000000ac 00000094
   stack_dump: 0x3fc96f70: 00000004 00000001 00002850 00000000 00000000 
0000816d 464c457f 00010101
   stack_dump: 0x3fc96f90: 00000000 00000000 005e0001 00000001 00000030 
00000000 00002378 00000300
   stack_dump: 0x3fc96fb0: 00000034 00280000 001e001f 00000000 3fc97770 
00000000 00000000 00000000
   stack_dump: 0x3fc96fd0: 00000000 00000000 00000000 00000000 00000000 
00000000 00000000 00000000
   stack_dump: 0x3fc96ff0: 00000003 00000000 2a2a0a0a 2a2a2a2a 3c0296f0 
00000021 00000000 00000000
   stack_dump: 0x3fc97010: 82047fa6 3fc97050 3fc8af8c 3fc976c0 00000064 
3fc97050 3fc8af8c 3fc970f0
   stack_dump: 0x3fc97030: 3c0296f0 00000021 3fc8c6c4 3fc971ac 82047d5a 
3fc97090 3fc8af8c 3fc970f0
   stack_dump: 0x3fc97050: 00000014 420357a0 4203575c 420599dc 3fc970f0 
00000000 00000000 00000021
   stack_dump: 0x3fc97070: fffffff4 3c0296f0 00000000 00000000 820347c9 
3fc970c0 3fc8af8c 3fc8c700
   stack_dump: 0x3fc97090: 00000000 00000000 0000a5f0 00000110 00000000 
3c0296f0 00000021 3c0075c3
   stack_dump: 0x3fc970b0: 82032ff8 3fc97120 42047c20 00000001 7665642f 
6d61722f 00000030 00057cc8
   stack_dump: 0x3fc970d0: 00009f5c 00057cc8 0000a0c0 00000000 00000000 
00000110 00000200 3c007610
   stack_dump: 0x3fc970f0: 3c029624 00000000 00000000 00000000 3c0075ba 
3c0074a0 00060622 00000000
   stack_dump: 0x3fc97110: 00000000 3fc97140 00000000 42047c20 3fc96980 
3fc89a38 00000000 3fc89a38
   stack_dump: 0x3fc97130: 00000000 3fc97160 00000000 00000000 00000000 
00000000 00000000 00000000
   stack_dump: 0x3fc97150: 00000000 00000000 00000000 00000000 00000000 
00000000 00000000 00000000
   ```
   
   as log.txt
   
   and use
   
   `/tools/gdbserver.py -a esp32s3 -e nuttx  -l log -p 1235`
   `xtensa-esp32s3-elf-gdb nuttx -ex "target remote :1235"`
   
   get this:
   
![image](https://github.com/user-attachments/assets/fe23aeba-1f15-474c-8010-a811158fcf44)
   
   
   
   crash in memcpy
   
![image](https://github.com/user-attachments/assets/8051301f-4149-4abc-baa5-45f17f1eda8d)
   
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to