Skip to content

Instantly share code, notes, and snippets.

View rocallahan's full-sized avatar

Robert O'Callahan rocallahan

View GitHub Profile
@rocallahan
rocallahan / test.c
Created August 3, 2016 23:30
Standalone testcase for PTRACE_EVENT_EXIT bug (reduced)
/* gcc -lpthread -g -o test test.c */
#include <assert.h>
#include <errno.h>
#include <linux/filter.h>
#include <linux/seccomp.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@rocallahan
rocallahan / ptrace_event_exit_bug.c
Created August 2, 2016 06:09
Standalone testcase for PTRACE_EVENT_EXIT bug
#define _GNU_SOURCE
#include <sched.h>
#include <assert.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/syscall.h>
#include <sys/fcntl.h>
#include <sys/user.h>