I build frida-gum and devkit by arm-unknown-linux-musleabi cross toolchains.
Then i build frida-gum-example.c in devkit folder.
I run frida-gum-example in my IOT device, but report "Segmentation fault" error.
My IOT's linux kernel version is Linux xxxx 3.4.39 #103 SMP PREEMPT Thu Mar 5 03:00:52 UTC 2020 armv7l GNU/Linux
CPUINFO is
Processor : ARMv7 Processor rev 5 (v7l)
processor : 0
BogoMIPS : 1942.85
processor : 1
BogoMIPS : 1942.85
processor : 2
BogoMIPS : 1942.85
processor : 3
BogoMIPS : 1942.85
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : sun8i
Revision : 0000
Serial : 87681f28d9376c118000
Chipid : 6c1180001f28d937876811460461872a
I want know why report "Segmentation fault", so i upload gdb to my IOT device, and run
gdb frida-gum-example
GDB find the Segmentation fault position is:
Starting program: /tmp/frida-gum-example
Program received signal SIGSEGV, Segmentation fault.
0x0006989c in _frida_ARM_getInstruction ()
(gdb)
Then i add a breakpoint in 0x0006989c and run, program breaked, disassemble is
I build frida-gum and devkit by arm-unknown-linux-musleabi cross toolchains. Then i build frida-gum-example.c in devkit folder. I run frida-gum-example in my IOT device, but report "Segmentation fault" error. My IOT's linux kernel version is
Linux xxxx 3.4.39 #103 SMP PREEMPT Thu Mar 5 03:00:52 UTC 2020 armv7l GNU/Linux
CPUINFO is
I want know why report "Segmentation fault", so i upload gdb to my IOT device, and run
gdb frida-gum-example
GDB find the Segmentation fault position is:Then i add a breakpoint in 0x0006989c and run, program breaked, disassemble is
I can find, the "Segmentation fault" position code is:
0x0006989c <+56>: ldrb r5, [r7, #1]
so, I show the registers by "info registers" command, the result is:
you can find, r7 register is 0!!!!!!!!!!!!!!!!!!!! This is cause "Segmentation fault" reason!!!!
so, i find the source code in ARMDisassmbler.c find code about the asm postision is
r7 register is code, but zero.
Is this a bug of frida-gum?