Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: third_party/afl/src/qemu_mode/patches/syscall.diff

Issue 2075883002: Add American Fuzzy Lop (afl) to third_party/afl/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 --- qemu-2.3.0/linux-user/syscall.c.orig 2014-12-09 14:45:43.000000000 +0 000
2 +++ qemu-2.3.0/linux-user/syscall.c 2015-03-27 06:33:00.736000000 +0000
3 @@ -227,7 +227,21 @@
4 _syscall3(int,sys_rt_sigqueueinfo,int,pid,int,sig,siginfo_t *,uinfo)
5 _syscall3(int,sys_syslog,int,type,char*,bufp,int,len)
6 #if defined(TARGET_NR_tgkill) && defined(__NR_tgkill)
7 -_syscall3(int,sys_tgkill,int,tgid,int,pid,int,sig)
8 +
9 +extern unsigned int afl_forksrv_pid;
10 +
11 +static int sys_tgkill(int tgid, int pid, int sig) {
12 +
13 + /* Workaround for -lpthread to make abort() work properly, without
14 + killing the forkserver due to a prematurely cached PID. */
15 +
16 + if (afl_forksrv_pid && afl_forksrv_pid == pid && sig == SIGABRT)
17 + pid = tgid = getpid();
18 +
19 + return syscall(__NR_sys_tgkill, pid, tgid, sig);
20 +
21 +}
22 +
23 #endif
24 #if defined(TARGET_NR_tkill) && defined(__NR_tkill)
25 _syscall2(int,sys_tkill,int,tid,int,sig)
OLDNEW
« no previous file with comments | « third_party/afl/src/qemu_mode/patches/elfload.diff ('k') | third_party/afl/src/qemu_mode/patches/translate-all.diff » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698