Skip to content

Commit ac33700

Browse files
committed
Flip and add test
1 parent 9ca41b6 commit ac33700

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include <signal.h>
2+
#include <sys/syscall.h>
3+
4+
int main() {
5+
// Get the current thread ID
6+
pid_t tid = syscall(SYS_gettid);
7+
// Send a SIGSEGV signal to the current thread
8+
syscall(SYS_tkill, tid, SIGSEGV);
9+
return 0;
10+
}
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# XFAIL: system-darwin
2+
# XFAIL: system-windows
3+
# RUN: %lldb -b -s %s -c %p/Inputs/x86-64-linux-tkill.test | FileCheck %s
4+
5+
thread list
6+
# CHECK: * thread #1, name = 'tkill.out', stop reason = SIGSEGV: sent by tkill system call (sender pid=649752, uid=2667987)

0 commit comments

Comments
 (0)