Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Hardfault when mp_parse is interrupted with pendsv. #3807

Closed
@iabdalkader

Description

@iabdalkader

Hello, I am getting a hardfault (INVSTATE) in nlrthumb.c if mp_parse is interrupted with pendsv. Is this behavior expected ? Could someone shed more light on the cause ?

Here's some info from GDB:

Breakpoint 1, HardFault_C_Handler (regs=0x2001fcc8) at stm32_it.c:144
144	    if (!pyb_hard_fault_debug) {
(gdb) backtrace 
#0  HardFault_C_Handler (regs=0x2001fcc8) at stm32_it.c:144
#1  <signal handler called>
#2  nlr_jump (val=0x200117e0) at ../../py/nlrthumb.c:85
#3  0x08092dd4 in mp_parse (lex=0x20012140, input_kind=(MP_PARSE_FILE_INPUT | unknown: 134819284)) at ../../py/parse.c:925
#4  0x0000004e in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

(gdb) print /x *regs
$1 = {r0 = 0x200117e0, r1 = 0x20, r2 = 0x4, r3 = 0x4, r12 = 0x2000, lr = 0x8092dd5, pc = 0x808ff84, xpsr = 0x100f000}

(gdb) print /x *SCB
$3 = {CPUID = 0x411fc270, ICSR = 0x400803, VTOR = 0x8020000, AIRCR = 0xfa050300, SCR = 0x0, CCR = 0x70200, SHPR = {0x0, 0x0, 0x0, 0x0, 0x0, 
    0x0, 0x0, 0x0, 0x0, 0x0, 0xf0, 0x0}, SHCSR = 0x0, CFSR = 0x20000, HFSR = 0x40000000, DFSR = 0xb, MMFAR = 0x0, BFAR = 0x0, AFSR = 0x0, 
  ID_PFR = {0x30, 0x200}, ID_DFR = 0x100000, ID_AFR = 0x0, ID_MFR = {0x110030, 0x0, 0x1000000, 0x0}, ID_ISAR = {0x1101110, 0x2112000, 
    0x20232231, 0x1111131, 0x1310132}, RESERVED0 = {0x0}, CLIDR = 0x9000003, CTR = 0x8303c003, CCSIDR = 0xf00fe019, CSSELR = 0x0, 
  CPACR = 0xf00000, RESERVED3 = {0x0, 0x800, 0x0 <repeats 23 times>, 0x30003, 0x0, 0x0, 0x1000001, 0x0 <repeats 64 times>}, STIR = 0x0, 
  RESERVED4 = {0x0 <repeats 12 times>, 0xc0000000, 0xfffffff8, 0x0}, MVFR0 = 0x10110221, MVFR1 = 0x12000011, MVFR2 = 0x40, RESERVED5 = {0x0}, 
  ICIALLU = 0x0, RESERVED6 = {0x0}, ICIMVAU = 0x0, DCIMVAC = 0x0, DCISW = 0x0, DCCMVAU = 0x0, DCCMVAC = 0x0, DCCSW = 0x0, DCCIMVAC = 0x0, 
  DCCISW = 0x0, RESERVED7 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, ITCMCR = 0x73, DTCMCR = 0x43, AHBPCR = 0x9, CACR = 0x2, AHBSCR = 0x800, 
  RESERVED8 = {0x0}, ABFSR = 0x0}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions