Repository navigation
Open
Description
The SIGSEGV error is encountered probabilistically when the test program is repeatedly launched.The source code of the test program is as follows:
multi_thread_test.cpp
The compile options are as follows:
-std=c++11 -g -O0 -lpthread -ldl -lrt -lresolv -lm src/frida-gum/libfrida-gum.a
libfrida-gum.a is taken from https://github.com/frida/frida/releases/download/16.5.1/frida-gum-devkit-16.5.1-linux-x86_64.tar.xz
The gdb information is as follows:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./frida-multi-test'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x0000000000406827 in matrix_multiply (a=5, b=65535) at src/frida-gum/multi_thread_test.cpp:23
23 int matrix_multiply(int a, int b) {
[Current thread is 1 (Thread 0x7fd7df22a700 (LWP 434103))]
(gdb) bt
#0 0x0000000000406827 in matrix_multiply (a=5, b=65535) at src/frida-gum/multi_thread_test.cpp:23
#1 0x00000000004068ab in thread_func (arg=0x7ffd48c64470) at src/frida-gum/multi_thread_test.cpp:35
#2 0x00007fd7e24cc6ca in start_thread () from /lib64/libpthread.so.0
#3 0x00007fd7e1336edf in clone () from /lib64/libc.so.6
(gdb) disassemble /r
Dump of assembler code for function matrix_multiply(int, int):
0x0000000000406826 <+0>: e9 dd 07 6b 00 jmpq 0xab7008
0x000000000040682b <+5>: 66 90 xchg %ax,%ax
0x000000000040682d <+7>: 89 75 f8 mov %esi,-0x8(%rbp)
0x0000000000406830 <+10>: 8b 55 fc mov -0x4(%rbp),%edx
0x0000000000406833 <+13>: 8b 45 f8 mov -0x8(%rbp),%eax
0x0000000000406836 <+16>: 01 d0 add %edx,%eax
0x0000000000406838 <+18>: 5d pop %rbp
0x0000000000406839 <+19>: c3 retq
End of assembler dump.
(gdb) info reg
rax 0x1 1
rbx 0x0 0
rcx 0x7ffffff7 2147483639
rdx 0x2 2
rsi 0x2 2
rdi 0x1 1
rbp 0x7fd7df229f10 0x7fd7df229f10
rsp 0x7fd7df229ed0 0x7fd7df229ed0
r8 0x1 1
r9 0x12 18
r10 0x64 100
r11 0x0 0
r12 0x0 0
r13 0x7ffd48c643df 140725824406495
r14 0x7fd7df22a9c0 140565138287040
r15 0x7fd7df22a700 140565138286336
rip 0x406827 0x406827 <matrix_multiply(int, int)+1>
eflags 0x10202 [ IF RF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
k0 0x0 0
k1 0x0 0
k2 0x0 0
k3 0x0 0
k4 0x0 0
k5 0x0 0
k6 0x0 0
k7 0x0 0
(gdb) quit
Metadata
Metadata
Assignees
Labels
No labels
Activity
byte0100 commentedon Aug 19, 2025
This error can also be reproduced in the latest version 17.2.16.
libfrida-gum.ais taken from https://github.com/frida/frida/releases/download/17.2.16/frida-core-devkit-17.2.16-linux-x86_64.tar.xzThe source code of the test program which adapt to version 17.2.16 is as follows:
multi_thread_test.cpp
The gdb information is as follows: