How to debug segmantation fault happening on 'stp' instruction in arm binary?

248 Views Asked by At

My application randomly and rarely crashes with segmentation fault signal. When coredump is opened in GDB following can be seen:

  • arm instruction leading to crash is:

    0x7f8ea08130 fd 7b b7 a9 stp x29, x30, [sp,#-144]!

  • When code of crashed frame is browsed in GDB, breakpoint stops at opening curly brace of a function:
 void SomeClass::someMethod(const std::string& s, int i)
 >{  
    ...
  }
  • examining of 'sp' register gives following output:
x $sp
>~"0x7fc761a070:\t0xc761a270\n" 

x $sp-144\n"
>~"0x7fc7619fe0:\t"
>&"Cannot access memory at address 0x7fc7619fe0\n"
>169^error,msg="Cannot access memory at address 0x7fc7619fe0" 
  • stack trace seems fine and not corrupted
  • there are roughly 300 frames in stack and stack size limit is set to be 8192K

UPD: the pagesize in the system is 4k:

>grep -i pagesize /proc/1/smaps
KernelPageSize:        4 kB
MMUPageSize:           4 kB

What else I can check to debug this issue?

0

There are 0 best solutions below