11 lines · cpp
1#include <signal.h>2#include <sys/syscall.h>3 4int main() {5 // Get the current thread ID6 pid_t tid = syscall(SYS_gettid);7 // Send a SIGSEGV signal to the current thread8 syscall(SYS_tkill, tid, SIGSEGV);9 return 0;10}11 1#include <signal.h>2#include <sys/syscall.h>3 4int main() {5 // Get the current thread ID6 pid_t tid = syscall(SYS_gettid);7 // Send a SIGSEGV signal to the current thread8 syscall(SYS_tkill, tid, SIGSEGV);9 return 0;10}11